简体   繁体   English

Ubuntu 16.04:gem install bundler 返回错误

[英]Ubuntu 16.04: Error return on gem install bundler

I've been getting a return,我一直在得到回报,

~$ gem install bundler
ERROR:  Loading command: install (LoadError)
cannot load such file -- zlib
ERROR:  While executing gem ... (NoMethodError)
undefined method `invoke_with_build_args' for nil:NilClass

When trying to install Jekyll via gem bundler尝试通过 gem bundler 安装 Jekyll 时

I've found lots of resources of others getting this error such as,我发现其他人的很多资源都收到此错误,例如,

I've recompiled ruby after sudo apt-get libssl-dev as well as a few other dep/libs I could think of,我在sudo apt-get libssl-dev以及我能想到的其他一些 dep/libs 之后重新编译了 ruby​​,

but no results.但没有结果。 Any other ideas someone has?有人有其他想法吗?

Setup: Dell 2120 Ubuntu 16.04 LTS设置:戴尔 2120 Ubuntu 16.04 LTS

The package zlib is missing and causes the installer to fail.软件包 zlib 丢失并导致安装程序失败。

You need to install it like:您需要像这样安装它:

sudo apt-get install zlib1g-dev

What worked for me was following the respective issue on the official Jekyll repository in GitHub.对我有用的是关注 GitHub 中官方 Jekyll 存储库上的相应问题

Performing the following steps, I got it to work:执行以下步骤,我让它工作:

Remove any previously installed versions:删除任何以前安装的版本:

sudo apt-get purge jekyll
sudo apt-get purge ruby

Install ruby anew:重新安装 ruby​​:

sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties
sudo apt-get install libgdbm-dev libncurses5-dev automake libtool bison libffi-dev
curl -L https://get.rvm.io | bash -s stable
source ~/.rvm/scripts/rvm
echo "source ~/.rvm/scripts/rvm" >> ~/.bashrc
rvm install 
rvm install 2.4.1
rvm use 2.4.1 --default

Make sure you have, NodeJS and Python installed, if not - do so by:确保你已经安装了 NodeJS 和 Python,如果没有 - 这样做:

sudo apt-get install node
sudo add-apt-repository ppa:jonathonf/python-3.6
sudo apt-get update
sudo apt-get install python3.6

And at last,最后,

gem install jekyll

Result:结果:

jekyll -v
jekyll 3.4.3

Of course, now you could execute gem install bundler smoothly, too.当然,现在你也可以顺利执行gem install bundler了。


Hope this helps!希望这可以帮助!

在 Ubuntu 上运行 'gem install taps' 给出 ERROR: ... (NoMethodError) ... '&lt;&lt;' for # <bundler::specset:< div><div id="text_translate"><p> 我在 Ubuntu 11.04 上使用 Ruby 1.9.2 与 RVM 和 RubyGems 1.8.5 和当我运行</p><pre>gem install taps</pre><p> 我明白了</p><pre>ERROR: While executing gem... (NoMethodError) undefined method `&lt;&lt;' for #&lt;Bundler::SpecSet:0x000000020fbc50&gt;</pre><p> 我可以成功地迁移我的数据库</p><pre>heroku rake db:migrate</pre><p> 我正在尝试安装水龙头以便我可以运行</p><pre>heroku db:push</pre><p> 这给出了错误</p><pre>Taps Load Error: no such file to load -- taps/operation You may need to install or update the taps gem to use db commands. On most systems this will be: sudo gem install taps</pre><p> 谢谢你的帮助! </p></div></bundler::specset:<> - on Ubuntu running 'gem install taps' gives ERROR: … (NoMethodError) … '<<' for #<Bundler::SpecSet:

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 gem install bcrypt (gcc: error:) 在 Ubuntu 16.04 上 - gem install bcrypt (gcc: error:) on Ubuntu 16.04 gem install bundler错误 - gem install bundler error 在 Ubuntu 上运行 'gem install taps' 给出 ERROR: ... (NoMethodError) ... '&lt;&lt;' for # <bundler::specset:< div><div id="text_translate"><p> 我在 Ubuntu 11.04 上使用 Ruby 1.9.2 与 RVM 和 RubyGems 1.8.5 和当我运行</p><pre>gem install taps</pre><p> 我明白了</p><pre>ERROR: While executing gem... (NoMethodError) undefined method `&lt;&lt;' for #&lt;Bundler::SpecSet:0x000000020fbc50&gt;</pre><p> 我可以成功地迁移我的数据库</p><pre>heroku rake db:migrate</pre><p> 我正在尝试安装水龙头以便我可以运行</p><pre>heroku db:push</pre><p> 这给出了错误</p><pre>Taps Load Error: no such file to load -- taps/operation You may need to install or update the taps gem to use db commands. On most systems this will be: sudo gem install taps</pre><p> 谢谢你的帮助! </p></div></bundler::specset:<> - on Ubuntu running 'gem install taps' gives ERROR: … (NoMethodError) … '<<' for #<Bundler::SpecSet: 宝石安装捆绑器&amp;&amp;捆绑安装错误 - Gem install bundler && bundle install error 当我尝试在 Ubuntu 上安装 gem bundler 时,为什么会收到这些错误消息? (无法创建 Makefile) - Why I obtain these error messages when I try to install gem bundler on Ubuntu? (Could not create Makefile) Ruby on Rails Bundler activeadmin gem安装错误 - Ruby on Rails Bundler activeadmin gem install error 捆绑安装失败,并显示“错误:未安装宝石捆绑器” - bundle install fails with 'ERROR: Gem bundler not installed' 运行gem install bundler时出错 - Error when run gem install bundler 权限被拒绝@ Ubuntu_04.04上的rb_sysopen gem install pg - Permission denied @ rb_sysopen gem install pg on Ubuntu 16.04 已安装RVM捆绑器错误:未安装宝石捆绑器,请先运行`gem install bundler` - RVM bundler installed ERROR: Gem bundler is not installed, run `gem install bundler` first
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM