【问题标题】:Error while trying to install PythonMagic 0.9.11 on Fedora 21尝试在 Fedora 21 上安装 PythonMagic 0.9.11 时出错
【发布时间】:2015-04-10 06:02:14
【问题描述】:

以下是我在 Pythin0.9.11 文件夹上运行make 时命令行的输出。我在 Fedora 21 上。

 [user@localhost PythonMagick-0.9.11]$ make          
 Making all in pythonmagick_src                
 make[1]: Entering directory '/home/user/PythonMagick-0.9.11/pythonmagick_src'           
  CXX      libpymagick_la-_DrawableFillRule.lo                      
 _DrawableFillRule.cpp:3:28: fatal error: boost/python.hpp: No such file or directory                       
  #include <boost/python.hpp>                           
                        ^             
 compilation terminated.                        
 Makefile:645: recipe for target 'libpymagick_la-_DrawableFillRule.lo' failed         
 make[1]: *** [libpymagick_la-_DrawableFillRule.lo] Error 1          
 make[1]:  Leaving directory '/home/user/PythonMagick-0.9.11             /pythonmagick_src'                 
 Makefile:641: recipe for target 'all-recursive' failed            
 make: *** [all-recursive] Error 1         ``         

以下是来自 config.log 的 trace

gcc version 4.9.2 20141101 (Red Hat 4.9.2-1) (GCC) 
configure:3165: $? = 0
configure:3154: g++ -V >&5
g++: error: unrecognized command line option '-V'
g++: fatal error: no input files
compilation terminated.
configure:3165: $? = 4
configure:3154: g++ -qversion >&5
g++: error: unrecognized command line option '-qversion'
g++: fatal error: no input files
compilation terminated.
configure:3165: $? = 4
configure:3185: checking whether the C++ compiler works
configure:3207: g++    conftest.cpp -lposix >&5
/bin/ld: cannot find -lposix
collect2: error: ld returned 1 exit status
configure:3211: $? = 1
configure:3249: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "PythonMagick"
| #define PACKAGE_TARNAME "PythonMagick"
| #define PACKAGE_VERSION "0.9.11"
| #define PACKAGE_STRING "PythonMagick 0.9.11"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define PACKAGE "PythonMagick"
| #define VERSION "0.9.11"
| /* end confdefs.h.  */       

我安装了 gcc-c++。我不确定我哪里出错了,或者我缺少什么。我是新手。

【问题讨论】:

  • 链接时使用-lboost_python
  • 试试sudo apt-get install libboost-all-dev ?
  • 好的,谢谢...但是我应该把论点放在哪里?
  • 在 Makefile 中查找 -lposix 并在之后添加 -lboost_python。你还有/bin/ld: cannot find -lposix的问题
  • 好的,该信息确实有帮助......在检查 -lposix 时,我发现 boost-devel 没有安装......因此所有这些缺失的依赖项......非常感谢

标签: python g++ fedora pythonmagick


【解决方案1】:

对于所有遇到相同问题的人,我终于明白了这个问题。我已经安装了 boost 但没有安装 boost-devel。

sudo yum install boost-devel

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2016-01-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-09-24
    • 1970-01-01
    • 2020-01-19
    相关资源
    最近更新 更多