The compiler failed to generate an executable file. (RuntimeError)

前端 未结 10 1164
面向向阳花
面向向阳花 2020-12-09 04:06

I recently upgraded to OS Mountain Lion. A project I\'m working on requires gem sys-proctable as a dependency, but when I run bundle install I get:



        
相关标签:
10条回答
  • 2020-12-09 04:23

    Same problem occurred and I finally solved it. Here are the steps I followed:

    • Xcode, Xcode CLT
    • sudo xcodebuild -license
    • sudo port upgrade outdated
    • sudo port install apple-gcc42
    • rvm reinstall 1.9.3 #important!

    Really, I think just first,second and last steps required, but can not test it.

    0 讨论(0)
  • 2020-12-09 04:23

    Because i am sure i will land here again.

    My issue was that sudo xcodebuild -license does nothing actually and i had to manually start xcode to agree to their terms to get it working. What a glorious OS.

    0 讨论(0)
  • 2020-12-09 04:25

    Be sure to open XCode after updates. I found that I had to open it and accept the new license agreement after a recent update of XCode via the App Store. Otherwise I received the "The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first."

    0 讨论(0)
  • 2020-12-09 04:27

    Regarding Centos and Fedora.

    You have to install development tools first.

    which should be installed with

    dnf install @development-tools
    

    For more info see this https://stackoverflow.com/a/35303883/9003945

    0 讨论(0)
  • 2020-12-09 04:29

    The following steps resolved the issue.

    1. xcode-select install
    2. sudo xcodebuild -license

    Hope it helps someone.

    0 讨论(0)
  • 2020-12-09 04:29

    You have to install the latest Xcode and Command Line Tools (inside Xcode). It's obviously something with your Xcode or PATH. What does which clang give?

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