Unable to get MacPort functionality after installing Xcode 4.3

后端 未结 17 1933
野趣味
野趣味 2021-01-29 21:51

I am having trouble getting MacPorts to function properly. I just installed OSX Lion 10.7.3 I downloaded and installed MacPorts first, and then after reading the requirements, I

相关标签:
17条回答
  • 2021-01-29 22:20

    Here is a solution that has worked for me:

    1. Install Command Line Tools for Xcode

      Xcode -> Preferences -> Downloads
      
    2. Help MacPorts find the right Xcode folder

      sudo /usr/bin/xcode-select -switch /Applications/Xcode.app
      
    3. Create symbolic links for clang compilers as they now live elsewhere

      sudo ln -s `which clang` /Applications/Xcode.app/Contents/Developer/usr/bin/
      sudo ln -s `which clang++` /Applications/Xcode.app/Contents/Developer/usr/bin/
      
    0 讨论(0)
  • 2021-01-29 22:24

    Try using trunk, there's no release supporting Xcode 4.3 yet.

    0 讨论(0)
  • 2021-01-29 22:24

    As alternative: you can make downgrade of Xcode to 4.2.1 version. DMG of Xcode 4.2.1 placed here: https://developer.apple.com/downloads/index.action

    After this MacPorts became works fine for me.

    0 讨论(0)
  • 2021-01-29 22:25

    Setting the developer path in /opt/local/etc/macports.conf works for me,

    developer_dir /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain
    

    since most of the compilers are stored there now instead of /usr/bin under Developer.

    0 讨论(0)
  • 2021-01-29 22:25
    sudo mv /usr/bin/xcodebuild /usr/bin/xcodebuild.old
    sudo ln -s /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild /usr/bin/xcodebuild 
    
    0 讨论(0)
  • 2021-01-29 22:26

    This is fixed in MacPorts 2.0.4.

    To upgrade:

    1. Download MacPorts 2.0.4 from the install site or run sudo port selfupdate.
    2. Run the MacPorts migration described here to reinstall all ports. This is painful but required to get back to a working state.
    0 讨论(0)
提交回复
热议问题