Can't update Macports (with Mac OS X Mavericks)

前端 未结 9 1653
独厮守ぢ
独厮守ぢ 2020-12-22 16:18

After upgrading Mac OS X to newest version Mavericks, I attempted to selfupdate my Macports, but it failed:

$ sudo port -v selfupdate
--->  Updating MacPo         


        
相关标签:
9条回答
  • 2020-12-22 17:05

    I had this issue on Mountain Lion and it was actually to do with MacPorts looking at an old XCode path (I had several versions including betas installed). I ran with the -d option and checked the config.log file at /opt/local/var/macports/sources/rsync.macports.org/release/base and it reported some errors:-

    --- 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 ---
    

    So I gave it the correct path using:-

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

    and that fixed it.

    I got my clues from this useful page.

    0 讨论(0)
  • 2020-12-22 17:07

    I got an error with selfupdate, and resolved it by doing a fresh installation of MacPorts from http://www.macports.org/install.php. Now I can run the selfupdate command without error and install other ports.

    The error I were seeing was below, it seems the same problem as Yo Sophia has pointed out:

    $ 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
    
    0 讨论(0)
  • 2020-12-22 17:07

    The problem seems to be with Macports and the location of the Tcl framework and it's path once Xcode has been installed. I suggest installing a fresh version of Macports for Mavericks here : http://www.macports.org/install.php.

    0 讨论(0)
提交回复
热议问题