在安装耐用性时发生了一个错误[英] An error occurred while installing rugged

本文是小编为大家收集整理的关于在安装耐用性时发生了一个错误的处理方法,想解了在安装耐用性时发生了一个错误的问题怎么解决?在安装耐用性时发生了一个错误问题的解决办法?那么可以参考本文帮助大家快速定位并解决问题。

问题描述

按照本教程 [link] 在专用服务器上安装 gitlab.我需要:

sudo -u git -H bundle install --deployment --without development test postgres aws

但是安装坚固耐用时出错:

Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

    /usr/local/bin/ruby extconf.rb
checking for cmake... no
ERROR: CMake is required to build Rugged.
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:
    --with-opt-dir
    --without-opt-dir
    --with-opt-include
    --without-opt-include=${opt-dir}/include
    --with-opt-lib
    --without-opt-lib=${opt-dir}/lib
    --with-make-prog
    --without-make-prog
    --srcdir=.
    --curdir
    --ruby=/usr/local/bin/ruby


    Gem files will remain installed in /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/rugged-0.21.2 for inspection.
    Results logged to /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/rugged-0.21.2/ext/rugged/gem_make.out
    An error occurred while installing rugged (0.21.2), and Bundler cannot continue.
    Make sure that `gem install rugged -v '0.21.2'` succeeds before bundling.

所以我安装了坚固的 -> 我安装了 CMake &配置包:

/home/git/gitlab$ sudo gem install rugged
Building native extensions.  This could take a while...
Successfully installed rugged-0.21.2
Parsing documentation for rugged-0.21.2
unable to convert "\xC0" from ASCII-8BIT to UTF-8 for lib/rugged/rugged.so, skipping
1 gem installed

但它并没有改变任何东西:

Errno::EACCES: Permission denied - /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/rugged-0.21.2/LICENSE
An error occurred while installing rugged (0.21.2), and Bundler cannot continue.
Make sure that `gem install rugged -v '0.21.2'` succeeds before bundling.

有什么想法吗?

推荐答案

首先,尝试安装cmake:

sudo apt-get install cmake

然后,重复命令:

sudo -u git -H bundle install --deployment --without development test postgres aws

本文地址:https://www.itbaoku.cn/post/786440.html