安装 RedCloth 时出错
当我尝试在 openSuse 上安装 RedCloth 时,我遇到了这个错误:
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
我尝试用 google 搜索并分析所有内容。所以我需要这方面的帮助。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我刚刚遇到了
同样类似的问题,并通过安装 ruby 开发包修复了它。对我来说,命令是:我在 此博客。
这并不是这个问题的确切答案,但希望它对偶然发现此页面的其他人有用。
I just had
this samea similar problem and fixed it by installing the ruby dev package. For me, the command was: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.
如果 Google 的波兰语翻译正确,则您的计算机上没有安装
make
。尝试输入
which make
。如果您什么也没看到,那么您需要先处理它。我不确定您在 OpenSuse 中需要的包的名称。您应该能够在 Yum(Yast?无论 OpenSuse 的包管理器叫什么...)中搜索类似 Debian 的“build-essential”包之类的东西。编辑:在OpenSuse中,您需要的包似乎称为“C/C++ Development”(或“C/C++ Compiler and Tools”)。请参阅此线程以获取一些指示: http://forums.opensuse.org/applications /413553-build-essential.html
我不知道 OpenSuse,但如果它是类似 Debian 的东西,您可能还可以直接从包管理器安装 Ruby gems(以及 Perl 和 Python 模块)。这可能是好事,也可能是坏事。很好,因为包管理器比您自己更好地处理依赖项和卸载(平均而言)。不好的是,发行版通常会有比您自己可以获得的版本旧的版本。尽管如此,这仍然是一个值得考虑的选择。
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.
如果使用 Windows 和 RubyInstaller.org,我相信您需要安装他们提供的 devkit。
If using Windows and RubyInstaller.org, I believe you need to install the devkit they provide.
如果您在检查
which make
后进行了 make,并且通过检查which ruby
确定您已经安装了 ruby,则可能是您安装了类似于sudo apt 的东西-get install ruby1.9.1-dev
然后改变了主意并删除了它,因为现在您使用rbenv
或rvm
或者只是从源代码安装。问题是对/var/lib/ruby/1.9.1/
的引用仍将与ruby gem
关联,并尝试在那里安装 gem。解决方案可能是删除该目录 sudo rm -rf /var/lib/ruby/1.9.1/ ,这可以解决问题。If you have make after checking with
which make
and you are sure you have ruby installed by checkingwhich ruby
it could be that you had installed something similar tosudo apt-get install ruby1.9.1-dev
and then changed your mind and removed that because now you userbenv
orrvm
or just installed from source. The problem is that the reference to/var/lib/ruby/1.9.1/
will still be associated withruby gem
and will try to install the gems there. Solution could be to remove that directorysudo rm -rf /var/lib/ruby/1.9.1/
and that could fix the issue.