2014-12-14 30 views
27

Làm theo hướng dẫn này [link] để cài đặt gitlab trên máy chủ chuyên dụng. Tôi cần phải:Đã xảy ra lỗi trong khi cài đặt gồ ghề

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

Nhưng một lỗi xảy ra khi cài đặt gồ ghề:

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. 

Vì vậy, tôi cài đặt gồ ghề -> Tôi đã cài đặt CMake & config-pkg:

/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 

Nhưng nó không thay đổi bất kỳ điều gì:

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. 

Bất kỳ ý tưởng nào?

+0

'cái dùng git' thể đọc '/ home/git/gitlab/vendor/bundle/ruby ​​/ 2.0.0/gems/rugged-0.21.2/LICENSE' (anh ấy nên)? Bởi vì bạn đã làm 'sudo gem install rugged' để chúng có thể được sở hữu bởi root. –

+0

Bạn có một cách dễ dàng hơn để cài đặt GitLab trong ubuntu, sử dụng gói [gitlab omnibus] (https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md) – PierreF

Trả lời

38

tiên, hãy thử cài đặt cmake:

sudo apt-get install cmake 

Sau đó, lặp lại các lệnh:

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

Với tôi, chạy 'sudo apt-get install cmake' là đủ. – lucke84

+0

nó hoạt động cho tôi quá, nhờ –

+0

Điều này cũng đã cố định vấn đề của tôi 'Hãy chắc chắn rằng' gem install rugged -v '0.25.0b2'' thành công trước khi bundling.' khi cố gắng sử dụng' gem 'github-linguist'' trong 'Gemfile' trong đường ray. Chúc mừng. –

3

Đối với tôi, đá quý đã phàn nàn về sự thiếu phụ thuộc vào pkg-config, vì vậy tôi đã làm:

sudo apt-get install pkg-config 

và sau đó

sudo gem install rugged -v '0.22.2' 

sau đó, tôi trở lại với phiên bản cũ của tôi về gitlab và chạy lại kịch bản cho việc nâng cấp.

phiên bản cũ của tôi về gitlab là 6.9.2 và phiên bản nâng cấp 8.0.5

+0

Tôi đã có cùng một trường hợp, cảm ơn –

36

Đối với OSX nếu bạn đang sử dụng homebrew:

brew install cmake 
bundle install 
Các vấn đề liên quan