我的系統是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
請問,這是什麼原因?
巴扎黑2017-04-26 09:02:55
其實charlock_holmes已經安裝成功了。
其實 charlock_holmes 安裝失敗了。
請問,這是什麼原因?
如其所言,是因為權限。你是不是沒有用 git 用戶來安裝?
我想大声告诉你2017-04-26 09:02:55
對於喜歡折騰,從源碼安裝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