Error installing RedCloth

↘锁芯ラ 提交于 2019-12-06 14:02:26

问题


I'm getting this erron when trying to install RedCloth on openSuse:

sudo gem install RedCloth
Building native extensions.  This could take a while...
ERROR:  Error installing RedCloth:
        ERROR: Failed to build gem native extension.

/usr/bin/ruby extconf.rb
creating Makefile

make
sh: make: nie znaleziono polecenia


Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/RedCloth-4.2.3 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/RedCloth-4.2.3/ext/redcloth_scan/gem_make.out

I tried to google this out and triend everything. So I need help with that.


回答1:


If Google's Polish translation is correct, then you don't have make installed on your machine.

Try entering which make. If you see nothing, then you need to handle that first. I'm not sure the name of the package you need in OpenSuse. You should be able to search in Yum (Yast? whatever OpenSuse's package manager is called...) for something like Debian's 'build-essential' package.

Edit: In OpenSuse, the package you need seems to be called "C/C++ Development" (or "C/C++ Compiler and Tools"). See this thread for some pointers: http://forums.opensuse.org/applications/413553-build-essential.html

I don't know OpenSuse, but if it's anything like Debian, you can probably also install Ruby gems (and Perl and Python modules) directly from your package manager. This can be good and bad. Good because the package manager takes better care of dependencies and uninstalling (on average) than you would on your own. Bad because the distro will often have older versions than you might be able to get yourself. Still, it's an option to consider.




回答2:


I just had this same a similar problem and fixed it by installing the ruby dev package. For me, the command was:

sudo apt-get install ruby1.9.1-dev

I found the answer (and a better description of the problem) on this blog.

It's not the answer to this question exactly, but hopefully it'll be of use to someone else who stumbles upon this page.




回答3:


If using Windows and RubyInstaller.org, I believe you need to install the devkit they provide.




回答4:


If you have make after checking with which make and you are sure you have ruby installed by checking which ruby it could be that you had installed something similar to sudo apt-get install ruby1.9.1-dev and then changed your mind and removed that because now you use rbenv or rvm or just installed from source. The problem is that the reference to /var/lib/ruby/1.9.1/ will still be associated with ruby gem and will try to install the gems there. Solution could be to remove that directory sudo rm -rf /var/lib/ruby/1.9.1/ and that could fix the issue.



来源:https://stackoverflow.com/questions/2552820/error-installing-redcloth

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!