1


,当我想安装捆绑包时,我想在 Debian 7.0 上安装 Gitlab,我得到 mysql2-0.3.11 的以下错误

    root@v22013051598612672:/home/git/gitlab# gem install mysql2 -v '0.3.11'
    Fetching: mysql2-0.3.11.gem (100%)
    Building native extensions.  This could take a while...
    ERROR:  Error installing mysql2:
    ERROR: Failed to build gem native extension.

    /usr/local/bin/ruby extconf.rb
    checking for rb_thread_blocking_region()... yes
    checking for rb_wait_for_single_fd()... yes
    checking for mysql_query() in -lmysqlclient... no
    checking for main() in -lm... yes
    checking for mysql_query() in -lmysqlclient... no
    checking for main() in -lz... yes
    checking for mysql_query() in -lmysqlclient... no
    checking for main() in -lsocket... no
    checking for mysql_query() in -lmysqlclient... no
    checking for main() in -lnsl... yes
    checking for mysql_query() in -lmysqlclient... no
    checking for main() in -lmygcc... no
    checking for mysql_query() in -lmysqlclient... no
    *** 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.



   Gem files will remain installed in /usr/local/lib/ruby/gems/1.9.1 /gems/mysql2-0.3.11 for inspecti                                                on.
   Results logged to /usr/local/lib/ruby/gems/1.9.1/gems/mysql2-0.3.11/ext/mysql2/gem_make.out

我有你的想法?

制造用户2182545 (ternes3)

PS:我需要它用于 GitLAB

4

2 回答 2

0

问题 754提到即使在 和 之后也看到此gem install mysql2错误apt-get install libmysqlclient-dev
但它也补充说:

编辑:解决了!

sudo apt-get install libmariadbclient16-dev

检查这是否是您的 Debian 上真正缺失的部分。

于 2013-06-03T17:59:50.790 回答
0

尝试通过安装 mysql + 库apt-get install mysql-server libmysqlclient libmysqlclient-dev mysql-client mysql-common

于 2013-06-03T17:37:43.617 回答