尝试安装 zsteg 时出错

尝试安装 zsteg 时出错

尝试安装时兹斯特格在 Ubuntu Server(Linux 4.8.0-49-generic x86_64)上我遇到以下错误:

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

    current directory: /var/lib/gems/2.3.0/gems/rainbow-2.2.2/ext
/usr/bin/ruby2.3 mkrf_conf.rb

current directory: /var/lib/gems/2.3.0/gems/rainbow-2.2.2/ext
/usr/bin/ruby2.3 -rubygems /usr/share/rubygems-integration/all/gems/rake-10.5.0/bin/rake RUBYARCHDIR=/var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/rainbow-2.2.2 RUBYLIBDIR=/var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/rainbow-2.2.2
/usr/bin/ruby2.3: No such file or directory -- /usr/share/rubygems-integration/all/gems/rake-10.5.0/bin/rake (LoadError)

rake failed, exit code 1

Gem files will remain installed in /var/lib/gems/2.3.0/gems/rainbow-2.2.2 for inspection.
Results logged to /var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/rainbow-2.2.2/gem_make.out

ruby2.3、ruby-dev 和 rake 已安装

并尝试过:

gem update --system

如果我不使用sudo,我会得到: ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /var/lib/gems/2.3.0 directory.

请帮忙。

答案1

我刚刚重新安装了 rake 和 zsteg,它们对我有用。

  1. 确保你有 ruby​​-dev
  2. update --system
  3. sudo gem install rake
  4. sudo gem install zsteg

相关内容