ruby-debug Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers

后端 未结 9 1984
清歌不尽
清歌不尽 2020-12-03 16:53

My Rails is 3.2.1.4, Ruby is 1.9.3p448.

I got an error when I install ruby-debug:

Building native extensions.          


        
相关标签:
9条回答
  • 2020-12-03 17:25

    It seems to be a issue with permission of gcc.. however, if you're using OS X, you may encounter this issue if you've updated your XCode but haven't agree to their terms & conditions yet.. try typing gcc in your terminal would show you what if you've agreed.

    0 讨论(0)
  • 2020-12-03 17:31

    My mkmf.log showed that gcc (4.8.2 I think) didn't like a specific argument that was being used by atomic on

    $ gem install atomic
    

    So I had a very similar situation. The answer for me was to upgrade gcc/gcc-libs and lib tool.

    I use Arch linux, and only Arch linux. The proper way to do this is to run

    $ sudo pacman -Syu
    

    which upgrades all system packages.

    I installed Rails and hadn't run a system update since, which is where the issue came from. In most other *nix distros, you would update to the latest version of these packages by name, i.e. with apt, it would be something along the lines of

    $ sudo apt-get update
    

    followed by

    $ sudo apt-get upgrade {package-name}
    
    0 讨论(0)
  • 2020-12-03 17:31

    I had the issue because gcc wasn't available on my machine.

    Fixed it by installing gcc.

    sudo apt install build-essential
    
    0 讨论(0)
提交回复
热议问题