我最近升级到了 Snow Leopard,但使用了 Leopard 中的 Time Machine。Time Machine 要求从旧机器复制所有内容,我同意了。
我似乎在安装 Ruby 时遇到了麻烦,因为库的问题,当我尝试升级 Mac 端口时,虽然我安装了最新的 Mac 端口软件,但仍然失败。
有任何想法吗?
sudo port upgrade -d outdated
Warning: Skipping upgrade since ncursesw 5.7_0 >= ncursesw 5.7_0, even though installed variants "" do not match "+darwin_10". Use 'upgrade --enforce-variants' to switch to the requested variants.
Warning: Skipping upgrade since ncurses 5.7_0 >= ncurses 5.7_0, even though installed variants "" do not match "+darwin_10". Use 'upgrade --enforce-variants' to switch to the requested variants.
---> Computing dependencies for apr-util
---> Configuring apr-util
Error: Target org.macports.configure returned: configure failure: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_apr-util/work/apr-util-1.3.9" && ./configure --prefix=/opt/local --with-apr=/opt/local/bin/apr-1-config --with-expat=/opt/local --with-iconv=/opt/local --with-berkeley-db=/opt/local/include:/opt/local/lib/db46 --without-mysql --without-pgsql --with-sqlite3=/opt/local " returned error 1
Command output: checking for -ldb... no
checking for Berkeley DB 2 in /opt/local/include and /opt/local/lib/db46...
checking db2/db.h usability... no
checking db2/db.h presence... no
checking for db2/db.h... no
checking db.h usability... yes
checking db.h presence... yes
checking for db.h... yes
checking for db_open in -ldb2... no
checking db2/db.h usability... no
checking db2/db.h presence... no
checking for db2/db.h... no
checking db.h usability... yes
checking db.h presence... yes
checking for db.h... yes
checking for db_open in -ldb... no
checking for Berkeley DB 1.0.0 in /opt/local/include and /opt/local/lib/db46...
checking db1/db.h usability... no
checking db1/db.h presence... no
checking for db1/db.h... no
checking db.h usability... yes
checking db.h presence... yes
checking for db.h... yes
checking for dbopen in -ldb1... no
checking for Berkeley DB 1 in /opt/local/include and /opt/local/lib/db46...
checking db_185.h usability... no
checking db_185.h presence... no
checking for db_185.h... no
checking for Berkeley DB... not found
configure: error: Berkeley DB not found.
Error: Unable to upgrade port: 1
Before reporting a bug, first run the command again with the -d flag to get complete output.
答案1
按照说明进行操作并--enforce-variants
使用 10.6 默认变体重建已安装的端口:
sudo port selfupdate
sudo port upgrade -u --enforce-variants installed
编辑:如果你还没有,你可能还需要安装MacPorts 基础文件升级到 10.6 版本,然后升级 ports。有详细的说明这里。
答案2
是的,你用错了 Macports。
如果您更改操作系统,例如从 Leopard 更改为 Snow Leopard(但不是从 SL 更改为 Lion),则需要从头开始重新安装 Macports。请参阅Macports 迁移指南