我的系統是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
請問,這是什麼原因?
其實 charlock_holmes 安裝失敗了。
如其所言,是因為權限。你是不是沒有用 git 用戶來安裝?
試試看:
對於喜歡折騰,從源碼安裝GitLab的你,我推薦你查看此貼
GitLab CE 8.7 源碼安裝手冊(Centos6/REHL6)
下面回答你的問題
你出錯的原因是依賴的包缺失
GitLab on Centos6 需要安裝的套件如下: