因此,当我按照官方说明安装 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.
看着在线的他们说当缺少某些库时经常会出现这个问题。有一条评论证实了我所担心的事情……
解决问题,输入此命令
sudo apt-get 安装 libmysqlclient-dev
sudo apt-get 安装 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 2013 年 10 月 4 日星期五 11:46:29 CEST x86_64 GNU/Linux