我想在我的机器上建立一个名为CSWNet的库.Cmake可以找到Boost_INCLUDE_DIR和Boost_LIB_DIR,但它找不到名为Boost_DIR的选项,它是一个包含Boost的CMake配置文件的目录.它在哪里?请帮助,谢谢你.我得到的错误如下所示,我从ubuntu存储库安装了boost,它安装在/ usr/local中.
CMake Error at /usr/local/share/cmake-2.8/Modules/FindBoost.cmake:429 (message):
When requesting a specific version of Boost, you must provide at least the
major and minor version numbers, e.g., 1.34
Call Stack (most recent call first):
demos/CMakeLists.txt:149 (find_package)
Run Code Online (Sandbox Code Playgroud) 我尝试打包我的应用程序并静态链接所有库。但我收到此错误。 Makefile 如下所示:
CC = gcc
INCPATH = -I/home/johnny/Application/FileBasedReG/include/RealityGrid
LIBS = -L/home/johnny/Application/FileBasedReG/lib/RealityGrid -lReG_Steer -l:libxml2.a -l:libncurses.a -l:libm.a -l:libz.a -l:libtermcap.a
OBJECTS = mini_steerer.o
TARGET = mini_steerer
###### Compile ######
all: $(TARGET)
$(TARGET): $(OBJECTS)
$(CC) $(INCPATH) -o $(TARGET) $(OBJECTS) $(LIBS)
mini_steerer.o: ./mini_steerer.c ./mini_steerer.h
$(CC) -c $(INCPATH) -o mini_steerer.o ./mini_steerer.c
Run Code Online (Sandbox Code Playgroud)
我想我需要再添加一两个静态库,但我找不到它们是什么。
当我想libxml2在ubuntu上安装库时,我输入sudo apt-get install libxml2并输入tab键.有几个名字出来,例如libxml2,libxml2-dev,libxml2-dbg和libxml2-uils.
这些后缀的全名是什么?我需要安装哪一个?
完成安装 mod_python 后,我收到 500 内部服务器错误。我查了一下日志,上面写着:python_handler:无法获取/创建解释器。
然后我打开一个python终端并测试我是否可以导入mod_python。然后我得到如下错误:
>>> import mod_python
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/mod_python/__init__.py", line 25, in <module>
import version
File "/usr/local/lib/python2.7/dist-packages/mod_python/version.py", line 3
version = "fatal: Not a git repository (or any of the parent directories): .git
^
SyntaxError: EOL while scanning string literal
Run Code Online (Sandbox Code Playgroud)
我使用命令 --with-python=/usr/bin/python 安装了 mod_python,版本为 2.7.3。
任何想法为什么会发生这种情况?先谢谢了!
编辑:我试图用 python2.6 重新安装 mod_python,我发现我错过了安装过程中发布的 SyntaxError。
SyntaxError: ('EOL while scanning string literal', ('/usr/local/lib/python2.6/site-packages/mod_python/version.py', 3, 79, 'version = "fatal: Not a git repository …Run Code Online (Sandbox Code Playgroud) 我正在尝试安装mod_python但是我收到了一个错误:
SyntaxError: ('EOL while scanning string literal', ('/usr/local/lib/python2.7/dist-packages/mod_python/version.py', 3, 79, 'version = "fatal: Not a git repository (or any of the parent directories): .git\n'))
Run Code Online (Sandbox Code Playgroud)
这是mod_python中使用的version.sh文件.
#!/bin/sh
MPV_PATH="`dirname $0`/../src/include/mp_version.h"
MAJ=`awk '/MP_VERSION_MAJOR/ {print $3}' $MPV_PATH`
MIN=`awk '/MP_VERSION_MINOR/ {print $3}' $MPV_PATH`
PCH=`awk '/MP_VERSION_PATCH/ {print $3}' $MPV_PATH`
GIT=`git describe --always`
echo $MAJ.$MIN.$PCH-$GIT
Run Code Online (Sandbox Code Playgroud)
我手动运行然后我得到:
fatal: Not a git repository (or any of the parent directories): .git
3.4.1-
Run Code Online (Sandbox Code Playgroud)
这是什么意思?请帮助!!
谢谢!