7
回答
在阿里云上执行到“sudo -u git -H bundle install --deployment --without”就不动了
【腾讯云】学生服务器套餐10元/月 >>>   

使用阿里云的主机安装Gitlab,按照官方教程按照到以下的步骤就不动了。


Install Gems

cd /home/git/gitlab

sudo gem install charlock_holmes --version '0.6.9.4'

# For MySQL (note, the option says "without ... postgres")
sudo -u git -H bundle install --deployment --without development test postgres aws

系统是ubuntu的系统,修改了安装源:

$ gem sources --remove https://rubygems.org/ 
$ gem sources -a http://ruby.taobao.org/ 
$ gem sources -l
执行到下面就不动了:

root@mmm:/home/git/gitlab# sudo -u git -H bundle install --deployment --without development test postgres aws
Fetching source index from https://rubygems.org/


举报
漠天
发帖于5年前 7回/3K+阅
共有7个答案 最后回答: 5年前

>>Fetching source index from https://rubygems.org/

还是去rubygems.org了嘛

--- 共有 1 条评论 ---
漠天不懂ruby,不过最好终于百度到了http://ruby.taobao.org,更换了源,最终还是没成功,64位的机器,有个包装不上。 5年前 回复
你还需要修改gemfile中的源地址
--- 共有 1 条评论 ---
漠天修改了。 安装nokogiri 1。5.10包时出问题"libxslt missing"。 libxslt1.1 libxslt1-dev libxml2都安装了。 google了很多文章都没解决,是不是64位系统的原因。 5年前 回复
不是的,我们就是64位的系统,没问题的如果你装了相关的库还是找不到的话,看看bundle install 有没有相关的选项指定库位置的 --with-xml什么的,你找找看
--- 共有 1 条评论 ---
漠天你好,我将安装时的日志在下面贴出来了。你能否给分析下。多谢!!! 5年前 回复
root@mervin:/home/git/gitlab# sudo gem install nokogiri -v '1.5.10' --with-iconv-include=/usr/include --with-xslt-include=/usr/local/include/libexslt --with-xslt-lib=/usr/local/lib --with-xml2-include=/usr/include/libxml2 --with-xml2-lib=/usr/lib
Building native extensions.  This could take a while...
ERROR:  Error installing nokogiri:
	ERROR: Failed to build gem native extension.

    /usr/local/bin/ruby extconf.rb
checking for libxml/parser.h... yes
checking for libxslt/xslt.h... yes
checking for libexslt/exslt.h... yes
checking for iconv_open() in iconv.h... no
checking for iconv_open() in -liconv... yes
checking for xmlParseDoc() in -lxml2... yes
checking for xsltParseStylesheetDoc() in -lxslt... no
-----
libxslt is missing.  please visit http://nokogiri.org/tutorials/installing_nokogiri.html for help with installing dependencies.
-----
*** 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
	--with-zlib-dir
	--without-zlib-dir
	--with-zlib-include
	--without-zlib-include=${zlib-dir}/include
	--with-zlib-lib
	--without-zlib-lib=${zlib-dir}/lib
	--with-iconv-dir
	--without-iconv-dir
	--with-iconv-include
	--without-iconv-include=${iconv-dir}/include
	--with-iconv-lib
	--without-iconv-lib=${iconv-dir}/lib
	--with-xml2-dir
	--without-xml2-dir
	--with-xml2-include
	--without-xml2-include=${xml2-dir}/include
	--with-xml2-lib
	--without-xml2-lib=${xml2-dir}/lib
	--with-xslt-dir
	--without-xslt-dir
	--with-xslt-include
	--without-xslt-include=${xslt-dir}/include
	--with-xslt-lib
	--without-xslt-lib=${xslt-dir}/lib
	--with-libxslt-config
	--without-libxslt-config
	--with-pkg-config
	--without-pkg-config
	--with-libxml-2.0-config
	--without-libxml-2.0-config
	--with-libiconv-config
	--without-libiconv-config
	--with-iconvlib
	--without-iconvlib
	--with-xml2lib
	--without-xml2lib
	--with-xsltlib
	--without-xsltlib


Gem files will remain installed in /usr/local/lib/ruby/gems/2.0.0/gems/nokogiri-1.5.10 for inspection.
Results logged to /usr/local/lib/ruby/gems/2.0.0/gems/nokogiri-1.5.10/ext/nokogiri/gem_make.out
root@mervin:/home/git/gitlab#


root@mervin:/mnt/other/libxslt-1.1.28# find /usr -name "*xslt*"
/usr/local/share/doc/libxslt-1.1.28
/usr/local/lib/ruby/gems/2.0.0/gems/nokogiri-1.5.10/lib/nokogiri/xslt.rb
/usr/local/lib/ruby/gems/2.0.0/gems/nokogiri-1.5.10/lib/nokogiri/xslt
/usr/local/lib/ruby/gems/2.0.0/gems/nokogiri-1.5.10/ext/nokogiri/xslt_stylesheet.c
/usr/local/lib/ruby/gems/2.0.0/gems/nokogiri-1.5.10/ext/nokogiri/xslt_stylesheet.h
/usr/local/lib/ruby/gems/2.0.0/gems/nokogiri-1.5.10/test/test_xslt_transforms.rb
/usr/local/lib/ruby/gems/2.0.0/gems/nokogiri-1.5.10/test/files/exslt.xml
/usr/local/lib/ruby/gems/2.0.0/gems/nokogiri-1.5.10/test/files/staff.xslt
/usr/local/lib/ruby/gems/2.0.0/gems/nokogiri-1.5.10/test/files/exslt.xslt
/usr/local/lib/ruby/gems/2.0.0/gems/nokogiri-1.5.10/test/xslt
/usr/local/lib/libxslt-plugins
/usr/local/include/libexslt
/usr/local/include/libxslt
/usr/share/aclocal/libxslt.m4
/usr/share/man/man3/libexslt.3.gz
/usr/share/man/man3/libxslt.3.gz
/usr/share/man/man1/xslt-config.1.gz
/usr/share/vim/vim73/ftplugin/xslt.vim
/usr/share/vim/vim73/indent/xslt.vim
/usr/share/vim/vim73/syntax/xslt.vim
/usr/share/doc/libxslt1-dev
/usr/share/doc/libxslt1-dev/html/libxslt-namespaces.html
/usr/share/doc/libxslt1-dev/html/libxslt-preproc.html
/usr/share/doc/libxslt1-dev/html/libxslt-security.html
/usr/share/doc/libxslt1-dev/html/libxslt-xsltInternals.html
/usr/share/doc/libxslt1-dev/html/libxslt-xsltexports.html
/usr/share/doc/libxslt1-dev/html/libxslt-documents.html
/usr/share/doc/libxslt1-dev/html/libxslt-transform.html
/usr/share/doc/libxslt1-dev/html/libxslt-extensions.html
/usr/share/doc/libxslt1-dev/html/libxslt-numbersInternals.html
/usr/share/doc/libxslt1-dev/html/libxslt-xsltutils.html
/usr/share/doc/libxslt1-dev/html/libxslt-xslt.html
/usr/share/doc/libxslt1-dev/html/libxslt-pattern.html
/usr/share/doc/libxslt1-dev/html/libxslt-variables.html
/usr/share/doc/libxslt1-dev/html/libxslt-attributes.html
/usr/share/doc/libxslt1-dev/html/libxslt-templates.html
/usr/share/doc/libxslt1-dev/html/libxslt-keys.html
/usr/share/doc/libxslt1-dev/html/libxslt-xsltlocale.html
/usr/share/doc/libxslt1-dev/html/libxslt-extra.html
/usr/share/doc/libxslt1-dev/html/libxslt-lib.html
/usr/share/doc/libxslt1-dev/html/libxslt-functions.html
/usr/share/doc/libxslt1-dev/html/libxslt-imports.html
/usr/share/doc/libxslt1-dev/xslt.html
/usr/share/doc/libxslt1-dev/libexslt-api.xml.gz
/usr/share/doc/libxslt1-dev/xsltproc2.html
/usr/share/doc/libxslt1-dev/Libxslt-Logo-90x34.gif
/usr/share/doc/libxslt1-dev/Libxslt-Logo-180x168.gif
/usr/share/doc/libxslt1-dev/EXSLT/html/libexslt-lib.html
/usr/share/doc/libxslt1-dev/EXSLT/html/libexslt-exsltexports.html
/usr/share/doc/libxslt1-dev/EXSLT/html/libexslt-exslt.html
/usr/share/doc/libxslt1-dev/tutorial/libxslt_tutorial.c
/usr/share/doc/libxslt1-dev/tutorial/libxslttutorial.html
/usr/share/doc/libxslt1-dev/tutorial/libxslttutorial.xml.gz
/usr/share/doc/libxslt1-dev/xsltproc.html
/usr/share/doc/libxslt1-dev/tutorial2/libxslt_pipes.xml.gz
/usr/share/doc/libxslt1-dev/tutorial2/libxslt_pipes.c.gz
/usr/share/doc/libxslt1-dev/tutorial2/libxslt_pipes.html
/usr/share/doc/libxslt1-dev/libxslt-api.xml.gz
/usr/share/doc/libxslt1-dev/libxslt-refs.xml.gz
/usr/share/doc/libxslt1-dev/libexslt-refs.xml.gz
/usr/share/doc/libxslt1-dev/exslt.html
/usr/share/doc/libxslt1.1
/usr/share/iptables/iptables.xslt
/usr/share/doc-base/libxslt1-dev
/usr/share/bison/xslt
/usr/lib/x86_64-linux-gnu/libexslt.so
/usr/lib/x86_64-linux-gnu/libxslt.la
/usr/lib/x86_64-linux-gnu/libxslt.a
/usr/lib/x86_64-linux-gnu/libxslt.so
/usr/lib/x86_64-linux-gnu/libxslt.so.1.1.26
/usr/lib/x86_64-linux-gnu/libexslt.la
/usr/lib/x86_64-linux-gnu/libxslt.so.1
/usr/lib/x86_64-linux-gnu/libexslt.so.0
/usr/lib/x86_64-linux-gnu/libexslt.a
/usr/lib/x86_64-linux-gnu/libexslt.so.0.8.15
/usr/lib/x86_64-linux-gnu/xsltConf.sh
/usr/lib/x86_64-linux-gnu/pkgconfig/libxslt.pc
/usr/lib/x86_64-linux-gnu/pkgconfig/libexslt.pc /usr/include/libexslt
/usr/local/lib/libxslt.so.1
/usr/local/lib/libexslt.so.0
/usr/local/lib/libexslt.a
/usr/local/lib/xsltConf.sh
/usr/local/lib/libexslt.so.0.8.17
/usr/local/lib/libxslt-plugins
/usr/local/lib/pkgconfig/libxslt.pc
/usr/local/lib/pkgconfig/libexslt.pc
/usr/local/include/libexslt
/usr/local/include/libexslt/exslt.h
/usr/local/include/libexslt/exsltconfig.h
/usr/local/include/libexslt/exsltexports.h
/usr/local/include/libxslt
/usr/local/include/libxslt/xslt.h
/usr/local/include/libxslt/xsltconfig.h
/usr/local/include/libxslt/xsltlocale.h
/usr/local/include/libxslt/xsltutils.h
/usr/local/include/libxslt/xsltexports.h
/usr/local/include/libxslt/xsltInternals.h
/usr/local/bin/xsltproc
/usr/local/bin/xslt-config 
root@mervin:grep xsltParseStylesheetDoc	-r /usr
grep: /usr/share/doc/openssl/changelog.gz: No such file or directory
grep: /usr/share/doc/libssl-dev/changelog.gz: No such file or directory
grep: /usr/share/doc/krb5-locales/CHANGES.gz: No such file or directory
grep: /usr/share/doc/p7zip/changelog.gz: No such file or directory
grep: /usr/share/doc/screen/patchlevel.h.gz: No such file or directory
grep: warning: /usr/share/recovery-mode/recovery-mode: recursive directory loop
Binary file /usr/lib/x86_64-linux-gnu/libxslt.a matches
Binary file /usr/lib/x86_64-linux-gnu/libxslt.so matches
Binary file /usr/lib/x86_64-linux-gnu/libxslt.so.1.1.26 matches
Binary file /usr/lib/x86_64-linux-gnu/libxslt.so.1 matches
grep: /usr/lib/mysql: No such file or directory
grep: /usr/src/linux-headers-3.2.0-23-generic/source: No such file or directory
/usr/include/libxslt/xsltInternals.h:			xsltParseStylesheetDoc	(xmlDocPtr doc);
grep: /usr/bin/db_sql: No such file or directory


显然是xsltlib和xmlib2没有搞好

注意安装完以后还要去编译下ruby的扩展

--- 共有 1 条评论 ---
漠天安装了python,但是没有安装python-dev。在apt-get 安装libxml2 xsltlib时,没有提示安装python-dev。但是通过自己编译源码是需要python.h头文件。如果才找到问题所在。 5年前 回复
顶部