分类: BSD
2008-04-19 19:11:03
重新安装已安装过的 ports
重新安装的前提是,之前有安装过或目前已安装。以 editors/joe 为例的话, 则: cd /usr/ports/editors/joe/ make deinstall make clean make install 或 make reinstall 升级已安装的 ports 如果已经安装好套件,事後欲升级的话,必须先移除旧版本的 port,移除的方法以 editors/joe 为例,则: cd /var/db/pkg/ pkg_delete joe-{version} cd /usr/ports/editors/joe/ make install 或是 cd /usr/ports/editors/joe/ make clean make reinstall 安装旧版的 ports 有时候会因为相依性,或是新版有问题,而会想装旧版本的套件。这里的方法是利用 CVS 的好处,回归到以前旧版本存在的日子,以安装旧版本的套件。首先,若我们要回复到某一个套件的版本时,需要去查询 FreeBSD ports CVS repository。最常见的就是 Freshports 网站、 FreeBSD 的 Mailing FreeBSD cvs 或是 FreeBSD ports cvsweb。 查到该套件版本所依存的日子後,就修改 CVS tag。一般预设 ports 的 CVStag 会写在 /usr/share/examples/cvsup/ports-supfile ,如要回朔到2002/10/05 号的话,则: vi /usr/share/examples/cvsup/ports-supfile ****************************************** default date=2002.10.05.00.00.00 #将 date 改成当日然後按照一般 CVSup 的时候一样,执行 CVSup (make update),此时的 portscollections 就会回到当时的情形,那麽该套件旧版本也会出现在 ports collections 中,只要安装即可。 如果仅是想把某部份的 ports 回朔,则必须加上额外的资讯,如仅希望把lang/perl5.8 回朔,而得知此属於 lang 中的一支,则: vi /usr/share/examples/cvsup/ports-supfile ****************************************** ports-all #将 ports-all 标示起来ports-lang #加入这行最後,执行 CVSup,并安装即可。目前若希望单独回朔单一的 ports,则比较麻烦。 安装 ports 出现 FORCE_PKG_REGISTER 的错误讯息 問題敘述: 當你先前已經用ports 安裝過某一軟體 當你要再次透過ports 安裝同一軟體時, 很有可能會出現類似下述的錯誤訊息產生. 意思是說 你可以透過 make deinstall 解除安裝 然後透過 make reinstall來再次安裝 若你確定想要*覆蓋*此安裝 可以透過設定 FORCE_PKG_REGISTER 變數達成目標. ===>; An older version of PORTS資料夾位置 is already installed (軟體版本) You may wish to ``make deinstall'' and install this port again by ``make reinstall'' to upgrade it properly. If you really wish to overwrite the old port of PORTS資料夾位置 without deleting it first, set the variable "FORCE_PKG_REGISTER" in your environment or the "make install" command line. 處理方式: 只要在make install 時加上 FORCE_PKG_REGISTER="yes" 就可以強制安裝. 也就是: /usr/ports/資料夾位址/#make install FORCE_PKG_REGISTER="yes" 解决安装 ports 时出现 sed -i 的错误 因为 BSD style 的 sed ,也就是 BSD 本身自有的 sed ,与一些 ports 编译期间所执行的 sed 不一致,所以会导致一些语 法错误。此时先安装 sed_inplace(textproc/sed_inplace),然後再安装原本无法安装的 ports: cd /usr/ports/???/???/ make -DUSE_REINPLACE install 安装 ports 出现 Shared object libintl.so.X not found 的错误讯息 Shared object "libintl.so.4" 或 (libc.so.4) not found 問題敘述: 近來的FreeBSD版本,常常在安裝某些軟體時,會出現類似的失敗畫面並且告訴你缺乏 libintl.so.4或是 libc.so.4 這個函式. Shared object "libc.so.4" not found 如下圖:是近來版本安裝某些程式問題時常見的問題,缺少 libc.so.4 函式. 問題分析: 提到libc.so函式 首先想到的是與 linux 程式相關共享函式庫. FreeBSD在讀取相關函式前,首先會在 /compat/linux 資料夾中尋找; 然後若找不到則會嘗試搜尋 /lib 資料夾. 以 libc.so 函式為例,會先尋找/compat/linux/lib/libc.so ; 其次才是/lib/libc.so .
|
|||
|