- 论坛徽章:
- 0
|
先到/usr/ports/x11/xorg安装了xorg
接着安装/usr/ports/x11-wm/xfce4:
make install clean
此时出现问题,说是缺少Python的头文件,我安装的是Python2.6:
checking for headers required to compile python extensions... not found
configure: error: could not find Python headers到网上查找解决方法,可惜出现此问题的中文网页很少,别说是中文的解决方法了,估计是咱们国家用ports安装X window再安装xfce4等软件的用户不多。于是在google english查找,结果发现有解决方法是要安装python-dev(见
见此链接
)描述:
Re: Python Headers
Posted by
Johnathan Corgan (Guest)
on 09.11.2008 17:52
On Sun, 2008-11-09 at 18:44 +0500, Umair Nasir wrote:
> checking for headers required to compile python extensions... not
> found
> configure: error: could not find Python headers
This means configure cannot find Python.h, which is part of the Python
development header file package. Normally that package is named
something like 'python-dev'.
-Johnathan
于是在/usr/ports目录下make search name=python-dev
找到两个ports:
1./usr/ports/deskutils/libopensync-plugin-python-devel 这个是依赖python26-2.6.2_3
2.lang/python25 这个是python25的
所以安装第一个:
cd /usr/ports/deskutils/libopensync-plugin-python-devel
make install clean
可是此时出现了另一个错误:pth.h errors ....说是缺少pth.h
在google english找到解决方法:
# ln -s /usr/local/include/pth/pth.h /usr/local/include/python2.6/
# ln -s /usr/local/include/pth/pthread.h /usr/local/include/python2.6/
故此,解决后,一切顺利安装完毕。
但是在编译py-orbit时,后来还是出错:
python header files not found...
python libraries not found...
我当时已经崩溃,一气之下决定下载python源码进行编译安装。
因此在www.freebsd.org的ports页面(http://www.freebsd.org/cgi/ports.cgi?query=&stype=all&sektion=all)中查找下py-orbit以及依赖的python版本,然后到python网站去下载相应的python源码,再编译,再安装。问题解决。
由此得到两点启示:
1.xxx-dev一般包括相关的开发的文件,当要编译某源码时,可能需要。
2.适当的时候可以通过软链接的方式(ln -s)将系统中存在的文件链接到某位置以供使用。
3.实在解决不了时,可以下载软件的源码进行编译安装。
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/74004/showart_2054448.html |
|