关于Wheezy的GitLab,安装Gems时出错,libmysqlclient-dev可能缺少但不可挽回

时间:2014-02-13 06:40:38

标签: mysql linux rubygems debian gitlab

所以,当我在官方tutorial之后安装GitLab时,我在Gems安装上遇到了错误。

Gem files will remain installed in /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/mysql2-0.3.11 for inspection.
Results logged to /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/mysql2-0.3.11/ext/mysql2/gem_make.out
An error occurred while installing mysql2 (0.3.11), and Bundler cannot continue.
Make sure that `gem install mysql2 -v '0.3.11'` succeeds before bundling.

online他们说这个问题经常出现在一些lib丢失的时候......一条评论证实了我害怕的......

  

问题解决,输入此命令

     

sudo apt-get install libmysqlclient-dev

     

sudo apt-get install mysql

     

然后运行gem install mysql2

问题是我试图安装它但是..

sudo apt-get install libmysqlclient-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package libmysqlclient-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  mysql-server-5.5

E: Package 'libmysqlclient-dev' has no installation candidate
已经安装了

和mysql-server-5.5 ......我该如何解决?

信息:Linux 3.10.13-x86_64-jb1#3 SMP Fri Oct 4 11:46:29 CEST 2013 x86_64 GNU / Linux

1 个答案:

答案 0 :(得分:3)

检查您的sources.list/etc/apt/sources.list)并确保在此处列出了这些回购

deb http://packages.dotdeb.org wheezy all
deb-src http://packages.dotdeb.org wheezy all

现在运行

sudo apt-get install libmysqlclient-dev

然后Gitlab gem也会毫无错误地安装。