rmagick安装失败

发布于 2024-12-27 09:34:42 字数 351 浏览 0 评论 0原文

我的环境:rvm ruby​​ 1.9.2 ,我从源代码构建ImageMagick 6.7.4-6

当我安装 rmagick 时,它说:

/home/rocky/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/mkmf.rb:368:in `try_do':编译器无法生成可执行文件。 (运行时错误) 您必须先安装开发工具。

不过,我的rvm中也有ruby 1.8.7,并且rmagick可以在1.8.7中正确安装。所以我很困惑我在 1.9.2 中错过了什么。

My env:rvm ruby 1.9.2 , and I build ImageMagick 6.7.4-6 from source.

When I install rmagick, it says:

/home/rocky/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/mkmf.rb:368:in `try_do': The complier failed to generate an executable file. (RuntimeError)
You have to install development tools first.

However, I also have ruby 1.8.7 in my rvm, and the rmagick can be installed correctly in 1.8.7. So I'm very confused what I missed in 1.9.2.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

梦幻之岛 2025-01-03 09:34:42

尝试以下

希望,您的环境是 ububtu

sudo apt-get install libmagickwand-dev

gem install rmagick

Try following

Hope, Your environment is ububtu

sudo apt-get install libmagickwand-dev

gem install rmagick

记忆消瘦 2025-01-03 09:34:42

感谢 Michael 的回答,关键是这样配置 ImageMagick:

./configure --disable-static --with-modules --without-perl --without-magick-plus-plus --with-quantum-depth=8

Thanks to Michael's answer, the key is to configure ImageMagick with this:

./configure --disable-static --with-modules --without-perl --without-magick-plus-plus --with-quantum-depth=8

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文