解决freebsd升级到最新ports遇到的问题

系统环境

uname -a
 AN 7.0-RELEASE  7.0-RELEASE #0: Wed Jul 31 16:20:23 CST 2013   amd64

更新系统的ports tree

先su获取root权限:

portsnap fetch
portsnap extract

出错

安装vim:

cd /usr//editors/vim
make  

出错:

 modifier 't'

 modifier 't'

 modifier 't'

 modifier 't'

"", line 137: Malformed conditional (${PYTHON_REL} < 300)
"", line 142: if-less endif
 modifier 't'

 modifier 't'

 modifier 't'

 modifier 't'

 modifier 't'

"/usr/ports//.sites.", line 953: Malformed conditional (!empty(_PERL_CPAN_ID) && ${_PERL_CPAN_FLAG:tl} == "cpan")
 modifier 't'

 modifier 't'

 modifier 't'

 modifier 't'

"/usr/ports/Mk/bsd.port.mk", line 2877: Unclosed conditional/for loop
"/usr/ports/Mk/bsd.port.mk", line 2877: Unexpected end of file in for loop.

"/usr/ports/Mk/bsd.port.mk", line 6590: Unclosed conditional/for loop
"/usr/ports/Mk/bsd.port.mk", line 6590: Unexpected end of file in for loop.

1 open conditional:
         at line 1177 (evaluated to true)
make: fatal errors encountered -- cannot continue

谷歌查了一下,原因是7.0这个release不是一个正在维护的版本了,更新后的ports tree和当前的版本不兼容。

解决办法

  • 升级当前系统到最新版本
  • 重新恢复port tree到当前对应版本

stackoverflow的一篇帖子给了我灵感,到freebsd的找到了ports tree的官方备份网站找到了压缩包,恢复之: 用root用户下载install.sh和ports.tgz到/root文件夹,执行脚本解压

sh ./install.sh

知识共享许可协议
本作品《解决freebsd升级到最新ports遇到的问题》verynix创作,采用知识共享署名-非商业性使用-禁止演绎 3.0 Unported许可协议进行许可。
基于verynix.com上的作品创作。
Permissions beyond the scope of this license may be available at verynix.com.

本文链接: http://verynix.com/freebsd-update-ports-error.html

Post Footer automatically generated by wp-posturl plugin for wordpress.

Leave a Reply

Your email address will not be published. Required fields are marked *