无法更新Macports(使用Mac OS X Mavericks)

时间:2013-10-27 19:18:23

标签: macos upgrade macports osx-mavericks

将Mac OS X升级到最新版本的Mavericks后,我尝试自我更新我的Macports,但它失败了:

$ sudo port -v selfupdate
--->  Updating MacPorts base sources using rsync
receiving file list ... done

sent 36 bytes  received 69 bytes  210.00 bytes/sec
total size is 4925440  speedup is 46908.95
receiving file list ... done

sent 36 bytes  received 76 bytes  74.67 bytes/sec
total size is 512  speedup is 4.57
MacPorts base version 2.2.0 installed,
MacPorts base version 2.2.1 downloaded.
--->  Updating the ports tree
Synchronizing local ports tree from rsync://rsync.macports.org/release/tarballs/ports.tar
receiving file list ... done

sent 36 bytes  received 70 bytes  70.67 bytes/sec
total size is 57702400  speedup is 544362.26
receiving file list ... done

sent 36 bytes  received 77 bytes  75.33 bytes/sec
total size is 512  speedup is 4.53
receiving file list ... rsync: change_dir "tarballs/PortIndex_darwin_13_i386" (in release) failed: No such file or directory (2)
done

sent 4 bytes  received 9 bytes  26.00 bytes/sec
total size is 0  speedup is 0.00
rsync error: some files could not be transferred (code 23) at /SourceCache/rsync/rsync-42/rsync/main.c(1400) [receiver=2.6.9]
Command failed: /usr/bin/rsync -rtzv --delete-after rsync://rsync.macports.org/release/tarballs/PortIndex_darwin_13_i386/PortIndex /opt/local/var/macports/sources/rsync.macports.org/release/tarballs
Exit code: 23
--->  MacPorts base is outdated, installing new version 2.2.1
Installing new MacPorts release in /opt/local as root:admin; permissions 0755; Tcl-Package in /Library/Tcl

checking build system type... x86_64-apple-darwin13.0.0
checking host system type... x86_64-apple-darwin13.0.0
checking target system type... x86_64-apple-darwin13.0.0
checking MacPorts version... 2.2.1
checking for sw_vers... /usr/bin/sw_vers
checking for defaults... /usr/bin/defaults
checking for xcode-select... /usr/bin/xcode-select
checking Mac OS X version... 10.9
checking Xcode location... /Applications/Xcode.app/Contents/Developer
checking Xcode version... 5.0.1
checking for gcc... /usr/bin/cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
<snip>
checking CommonCrypto/CommonDigest.h presence... yes
checking for CommonCrypto/CommonDigest.h... yes
checking for readline in -lreadline... yes
checking whether rl_username_completion_function is declared... no
checking whether rl_filename_completion_function is declared... yes
checking whether rl_completion_matches is declared... yes
checking whether username_completion_function is declared... yes
checking whether filename_completion_function is declared... yes
checking whether completion_matches is declared... yes
checking for Tcl configuration... configure: error: Can't find Tcl configuration definitions
Command failed: cd /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/base && CC=/usr/bin/cc OBJC=/usr/bin/cc ./configure --prefix=/opt/local --with-tclpackage=/Library/Tcl --with-install-user=root --with-install-group=admin --with-directory-mode=0755 --enable-readline && make SELFUPDATING=1 && make install SELFUPDATING=1
Exit code: 1
Error: Error installing new MacPorts base: command execution failed
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets
Error: /opt/local/bin/port: port selfupdate failed: Error installing new MacPorts base: command execution failed
$

如果我只是尝试升级特定端口,它也会失败:

$ sudo port upgrade emacsapp
Password:
Warning: port definitions are more than two weeks old, consider updating them by running 'port selfupdate'.
Error: emacsapp is not installed
$ sudo port search emacs
Password:
Warning: port definitions are more than two weeks old, consider updating them by running 'port selfupdate'.
$ sudo port upgrade emacs-app
Warning: port definitions are more than two weeks old, consider updating them by running 'port selfupdate'.
--->  Fetching archive for gperf
--->  Attempting to fetch gperf-3.0.4_2.darwin_13.x86_64.tbz2 from http://packages.macports.org/gperf
--->  Attempting to fetch gperf-3.0.4_2.darwin_13.x86_64.tbz2 from http://lil.fr.packages.macports.org/gperf
--->  Attempting to fetch gperf-3.0.4_2.darwin_13.x86_64.tbz2 from http://mse.uk.packages.macports.org/sites/packages.macports.org/gperf
--->  Fetching distfiles for gperf
--->  Attempting to fetch gperf-3.0.4.tar.gz from http://ykf.ca.distfiles.macports.org/MacPorts/mpdistfiles/gperf
--->  Verifying checksums for gperf
--->  Extracting gperf
Error: org.macports.extract for port gperf returned: command execution failed
Please see the log file for port gperf for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_gperf/gperf/main.log
Error: Problem while installing gperf
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets
$

任何想法

  • 如果这是由OS X Mavericks和Macports之间的不兼容引起的?
  • 如何解决?

编辑:

我尝试了一台不同的计算机将其从10.8.5升级到10.9,然后尝试为macports做selfupdate,它没有再次工作但是给出了一个不同的错误:

$ sudo port -v selfupdate
--->  Updating MacPorts base sources using rsync
receiving file list ... done
base.tar

sent 13396 bytes  received 10355 bytes  15834.00 bytes/sec
total size is 4925440  speedup is 207.38
receiving file list ... done
base.tar.rmd160

sent 64 bytes  received 635 bytes  1398.00 bytes/sec
total size is 512  speedup is 0.73
MacPorts base version 2.2.1 installed,
MacPorts base version 2.2.1 downloaded.
--->  Updating the ports tree
Synchronizing local ports tree from file:///opt/local/var/macports/sources/svn.macports.org/trunk/dports/
svn: E155036: Please see the 'svn upgrade' command
svn: E155036: Working copy '/opt/local/var/macports/sources/svn.macports.org/trunk/dports' is too old (format 10, created by Subversion 1.6)
Command failed: /usr/bin/svn update --non-interactive /opt/local/var/macports/sources/svn.macports.org/trunk/dports
Exit code: 1
Error: Synchronization of the local ports tree failed doing an svn update
Error: Couldn't sync the ports tree: Synchronization of 1 source(s) failed
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets
Error: /opt/local/bin/port: port selfupdate failed: Couldn't sync the ports tree: Synchronization of 1 source(s) failed

9 个答案:

答案 0 :(得分:282)

首先安装“命令行工具”:

sudo xcode-select --install

(有时需要通过“sudo xcodebuild -license”明确同意许可证)

然后升级端口:

sudo port -v selfupdate

答案 1 :(得分:37)

answered一个类似的问题。 Tcl框架的位置发生了变化,打破了现有的MacPorts基础架构。此后,Mavericks的2.2.1安装程序可用here。列出已安装的端口,并考虑在安装之前删除/opt/local。无论如何,您可能需要“更新”所有内容。

答案 2 :(得分:3)

您可能无法同意XCode许可。 如果xcode-install没有帮助,您可以运行belowing命令以同意Xcode许可证。 sudo xcodebuild -license

答案 3 :(得分:2)

存在实际错误
  

gperf @ 3.0.4:错误:预期参数声明符

幸运的是,这个问题在MacPorts ticket 40918

有自己的票

如果你能在http://trac.macports.org/wiki/MavericksProblems

看到小牛队的所有问题

答案 4 :(得分:2)

我有同样的问题。我假设您之前安装了Xcode命令行工具。只需启动XCODE并让它完成配置。现在重新运行port命令,它应该正常工作。

答案 5 :(得分:1)

我在selfupdate时遇到错误,并通过从http://www.macports.org/install.php全新安装MacPorts来解决它。现在我可以无错误地运行selfupdate命令并安装其他端口。

我看到的错误如下,似乎和索菲亚所指出的问题相同:

$ sudo port selfupdate
Password:
--->  Updating MacPorts base sources using rsync
MacPorts base version 2.1.3 installed,
MacPorts base version 2.2.1 downloaded.
--->  Updating the ports tree
--->  MacPorts base is outdated, installing new version 2.2.1
Installing new MacPorts release in /opt/local as root:admin; permissions 0755; Tcl-Package in /Library/Tcl

Error: /opt/local/bin/port: port selfupdate failed: Error installing new MacPorts base: command execution failed

答案 6 :(得分:0)

我主要想对@ Brett上面的答案发表评论(对不起,SO n00b仍然,不允许)并分享我升级的经验......不是真正的新答案,但希望有些有用的信息。

我按照上面的描述下载并安装了Mavericks MacPorts安装程序(但是没有删除/ opt,正如@King Julian所做的那样self update这很好,然后upgrade outdated它似乎是卸载并重新安装我的所有端口并显示一条消息:

Warning: Deactivate forced.  Proceeding despite dependencies.

每一个。幸运的是我复制了 etc apache2 / conf dirs,所以应该能够在最终完成后恢复我的配置...大约30分钟后它抛出错误

Unable to open port: extra characters after close-quote

所以我再次self updateupgrade outdated似乎再次运行......

所以看起来可以做到(LAMP一直都在工作) - 从头开始​​可能会更快,但要确保你至少有几个小时的时间(并连接到主电源; )

道歉信息太多,但希望有所帮助!

答案 7 :(得分:0)

问题似乎与Macports以及Tcl框架的位置以及安装Xcode后的路径有关。我建议在这里为小牛队安装一个新版Macports:http://www.macports.org/install.php

答案 8 :(得分:0)

我在Mountain Lion上遇到过这个问题,实际上它与MacPorts一样,看着旧的XCode路径(我有几个版本,包括安装了beta版)。我使用-d选项运行并检查了/opt/local/var/macports/sources/rsync.macports.org/release/base中的config.log文件,并报告了一些错误: -

--- snip ---
...
configure:3331: checking for C compiler version
configure:3340: gcc --version >&5
Configured with: --prefix=/Applications/Xcode5-DP3.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
xcrun: Error: could not stat active Xcode path '/Applications/Xcode5-DP3.app/Contents/Developer'. (No such file or directory)
configure:3351: $? = 0
configure:3340: gcc -v >&5
Configured with: --prefix=/Applications/Xcode5-DP3.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
xcrun: Error: could not stat active Xcode path '/Applications/Xcode5-DP3.app/Contents/Developer'. (No such file or directory)
...
--- snip ---

所以我使用以下方法给出了正确的路径: -

sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer

并修复了它。

我从this useful page获得了线索。