系统版本:FreeBSD 7.0-RELEASE
1.从port安装软件出现:cannot find -lgio-2.0错误
环境:glib2.14.2
解决办法:升级glib2.14.2到glib-2.16.4
port: devel/glib20
2.编译安装 x11/gnome2-lite 时出现:
gmake:***[libgiofam.la] Error1
我检查glib版本,发现同时存在glib-1.2.10_12和 glib-2.14.2,还有一个 dbus-glib-0.74 ,于是执行
#portupgrade glib
完成后,glib-2.14.2更新到glib-2.16.5,能成功安装完成。至于怎么有两个不同版本的glib共存,我还没有查明白。
小结:安装完FreeBSD后,在按照软件之前先检查glib版本,如果需要安装的软件需要用到新版本的glib的话先实行更新。我遇到的FreeBSD编译安装软件的问题多数是版本依赖的问题,一般按错误提示更新所依赖软件的版本能得到解决。
3.FreeBSD次版本升级(7.0-RELEASE to 7.2-RELEASE)后,更新整个软件库遇到部分库文件无法更新,具体为
”libX11-1.1.3_1,1 < needs updating (port has 1.2.1_1,1)
libXaw-1.0.4_1,1 < needs updating (port has 1.0.5_1,1)
libXext-1.0.3,1 < needs updating (port has 1.0.5,1)
libXi-1.1.3,1 < needs updating (port has 1.2.1,1)
libXmu-1.0.3,1 < needs updating (port has 1.0.4,1)“
使用”portupgrade -r libX11“时关联安装”libxslt“出现故障:
===> Vulnerability check disabled, database not found
===> Found saved configuration for libxslt-1.1.24_2
=> libxslt-1.1.24.tar.gz doesn’t seem to exist in /usr/ports/distfiles/gnome2.
=> Attempting to fetch from ftp://fr.rpmfind.net/pub/libxml/.
fetch: libxslt-1.1.24.tar.gz: local modification time does not match remote
检查匹配软件应为lixslt-1.1.24,进入/usr/ports/textproc/libxslt目录执行
#make distclean fetch
#make install clean
了解到”make distclean fetch“的作用是删掉本地的distfile,执行后成功安装”libxslt-1.1.24_2“。
再次执行:
#portupgrade -r libX11
注意:安装这些库文件时,或者笼统地说执行”portupgrade -r“指令时,通常都会遇到自定义make.conf的问题导致编译无法正常进行,原因是自定义的make.conf某些格式错误,更正之或执行这些之前应先将自定义的make.conf内容注释掉。
系统版本:FreeBSD 8.0-RELEASE
更新软件:
php5-extensions时,关联更新php5-filter-5.2.12,出现错误提示:
/usr/ports/security/php5-filter/work/php-5.3.2/ext/filter/logical_filters.c:500: error: ‘pcre’ undeclared (first use in this function)
/usr/ports/security/php5-filter/work/php-5.3.2/ext/filter/logical_filters.c:500: error: ‘re’ undeclared (first use in this function)
/usr/ports/security/php5-filter/work/php-5.3.2/ext/filter/logical_filters.c:501: error: ‘pcre_extra’ undeclared (first use in this function)
查看 /usr/port/UPDATING
20100409:
AFFECTS: users of lang/php5
AUTHOR: ale@FreeBSD.orgAs of php 5.3, a few extensions were removed from or included into the core
php5 package. Follow the steps below to update your installation.1) Delete the following packages (if installed):
– php5-dbase
– php5-ncurses
– php5-pcre
– php5-spl
– php5-ming
– php5-mhash2) Rebuild php5 and all ports depending on it.
说明某些php5扩展已经默认集成到php5核心组件中,不需要另外安装。
按要求执行后问题依旧存在,意识到删除php5系统提示时某些关联文件没有被删除,于是手工执行删除:
cd /usr/local; pkg_delete -f “php5*”; rm -r etc/php lib/php include/php
再次进入lang/php5
先执行 make clean,再执行make WITH_BUNDLED_PCRE=”YES” install clean
再安装lang/php5-extension
make clean && make install clean
问题得到解决
freebsd_tips: FreeBSD 更新ports后,若安装软件或执行portupgrade更新软件前,请先阅读/usr/ports/UPDATING
Thanks for your help! I’m a FreeBSD beginner. I got your help when I troubleshoot with “cannot find -glio-2.0”! Anyway,thanks! And your FreeBSD desktop is vary nice! Can you help me in detail to build up this desktop? Thanks very much!
相信”FreeBSD Handbook”是你目前最好的老师。再有什么问题我们可以共同探讨。