gitLab centos6.7安装问题

 派沃控制阀_689 发布于 2022-10-26 22:18

我的系统是Centos6.7的,我完全按照文档:https://gitlab.com/gitlab-org/gitlab-recipes/tree/master/install/centos,来进行安装。
当进行到Gems的安装步骤时,出问题了。

cd /home/git/gitlab

# For PostgreSQL (note, the option says "without ... mysql")
sudo -u git -H bundle config build.pg --with-pg-config=/usr/pgsql-9.3/bin/pg_config
sudo -u git -H bundle install --deployment --without development test mysql aws

执行:sudo -u git -H bundle install --deployment --without development test mysql aws,报错提示:

An error occurred while installing charlock_holmes (0.6.9.4), and Bundler cannot continue.
Make sure that `gem install charlock_holmes -v '0.6.9.4'` succeeds before bundling.

然后按照提示,安装charlock_holmes

gem install charlock_holmes -v '0.6.9.4'

安装成功,执行gem list可以看到:

*** LOCAL GEMS ***

bigdecimal (1.2.4)
bundler (1.11.2)
charlock_holmes (0.6.9.4)
....

然后重新执行命令:

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

结果还是报错,说没有安装charlock_holmes :

An error occurred while installing charlock_holmes (0.6.9.4), and Bundler cannot continue.
Make sure that `gem install charlock_holmes -v '0.6.9.4'` succeeds before bundling.

实际上charlock_holmes已经安装成功了。

当然除了这个报错,我还看到安装过程中的报错信息,分别有两条,可能跟权限有关系:

Installing charlock_holmes 0.6.9.4 with native extensions

Errno::EACCES: Permission denied @ rb_sysopen - /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/charlock_holmes-0.6.9.4/.gitignore
Installing rugged 0.21.2 with native extensions

Errno::EACCES: Permission denied @ rb_sysopen - /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/rugged-0.21.2/LICENSE

请问,这是什么原因?

3 个回答
  • 对于喜欢折腾,从源码安装GitLab的你,我推荐你查看此贴
    GitLab CE 8.7 源码安装手册(Centos6/REHL6)

    下面回答你的问题
    你出错的原因是依赖的包缺失

    GitLab on Centos6 需要安装的包如下:

    添加EPEL源:
    # 下载EPEL的GPG KEY,导入到系统中
    wget -O /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 https://mirrors.tuna.tsinghua.edu.cn/epel/RPM-GPG-KEY-EPEL-6
    rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
    # 安装`epel-release-latest-6.noarch.rpm`包,启用EPEL
    rpm -Uvh http://mirrors.ustc.edu.cn/epel/epel-release-latest-6.noarch.rpm
    yum groupinstall "Development tools"
    yum install gcc autoconf cmake unzip vim libcurl-devel zlib-devel curl-devel expat-devel gettext-devel openssl-devel perl-devel nodejs libicu-devel vim wget curl
    
    2022-10-27 01:46 回答
  • 试一下:

    $ sudo yum install libicu-devel
    2022-10-27 01:46 回答
  • 实际上charlock_holmes已经安装成功了。

    实际上 charlock_holmes 安装失败了。

    请问,这是什么原因?

    如其所言,是因为权限。你是不是没有用 git 用户来安装?

    2022-10-27 01:46 回答
撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有