puma gem - Failed to build gem native extension

前端 未结 13 734
广开言路
广开言路 2020-12-02 10:53

I was getting the following error while installing puma gem

    $ gem install puma
    Fetching: puma-2.11.2.gem (100%)
    Building native extensions.  This coul         


        
相关标签:
13条回答
  • 2020-12-02 11:20

    I've run into a similar error under Mac OS X 10.10.

    Details in the mkmf.log showed that this was due to:

    Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.

    Which was caused by the installation of a new version of Xcode. This was easily solved by accepting the Xcode license from Apple:

    sudo xcodebuild -license
    

    Hope this might help someone in the future ;-)

    0 讨论(0)
  • 2020-12-02 11:22

    libssl1.0-dev installing helped to me. Try

    apt-get install libssl1.0-dev
    

    and then

    gem install puma
    
    0 讨论(0)
  • 2020-12-02 11:24

    Have you tried

    DISABLE_SSL=true gem install puma
    

    Specify the version if you have version specific requirement like:

    DISABLE_SSL=true gem install puma -v version_number
    
    0 讨论(0)
  • 2020-12-02 11:25

    I had similar issue on OSx El Capitan. In order to fix the issue I had to do:

    brew install openssl
    brew link --force openssl
    
    0 讨论(0)
  • 2020-12-02 11:26

    Try the following

    gem install puma -- --with-cppflags=-I/usr/local/opt/openssl/include
    bundle install
    

    You can also specify the gem version, like the following:

    gem install puma -v '2.11.3' -- --with-cppflags=-I/usr/local/opt/openssl/include
    
    0 讨论(0)
  • 2020-12-02 11:29

    I had to do this beforehand: sudo apt-get install libgmp3-dev

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