求解各位大神:ubuntu12.04安装redmine出现的问题

其它类软件,非上述版软件
回复
nogoodbye
帖子: 3
注册时间: 2012-07-26 17:15

求解各位大神:ubuntu12.04安装redmine出现的问题

#1

帖子 nogoodbye »

本人菜鸟,花了一周的时间,在ubuntu10.04上安装成功了redmine1.4,今天在要公司的服务器(ubuntu12.04)上安装,可是当执行bundle install --without development test postgresql sqlite rmagick这一步时出现了:

Using rake (0.9.2.2)
Using activesupport (2.3.14)
Using rack (1.1.3)
Using actionpack (2.3.14)
Using actionmailer (2.3.14)
Using activerecord (2.3.14)
Using activeresource (2.3.14)
Using coderay (1.0.7)
Using fastercsv (1.5.5)
Using i18n (0.4.2)
Installing mysql (2.8.1) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

/usr/bin/ruby1.8 extconf.rb
checking for mysql_ssl_set()... no
checking for rb_str_set_len()... no
checking for rb_thread_start_timer()... no
checking for mysql.h... yes
creating Makefile

make
gcc -I. -I. -I/usr/lib/ruby/1.8/x86_64-linux -I. -DHAVE_MYSQL_H -D_FORTIFY_SOURCE=2 -D_FORTIFY_SOURCE=2 -I/usr/include/mysql -DBIG_JOINS=1 -fno-strict-aliasing -g -fPIC -fno-strict-aliasing -g -g -O2 -fPIC -c mysql.c
gcc -shared -o mysql_api.so mysql.o -L. -L/usr/lib -L. -Wl,-Bsymbolic-functions -Wl,-z,relro -rdynamic -Wl,-export-dynamic -lruby1.8 -L/usr/lib/x86_64-linux-gnu -lmysqlclient -lpthread -lz -lm -lrt -ldl -lpthread -lrt -ldl -lcrypt -lm -lc
/usr/bin/ld: cannot find crti.o: No such file or directory
collect2: ld returned 1 exit status
make: *** [mysql_api.so] Error 1


Gem files will remain installed in /home/cloud/.bundler/tmp/7421/gems/mysql-2.8.1 for inspection.
Results logged to /home/cloud/.bundler/tmp/7421/gems/mysql-2.8.1/ext/mysql_api/gem_make.out
An error occured while installing mysql (2.8.1), and Bundler cannot continue.
Make sure that `gem install mysql -v '2.8.1'` succeeds before bundling
.


望各位大神们帮个忙解决一下啊。谢谢各位了。
头像
枫叶饭团
帖子: 14683
注册时间: 2010-06-16 1:05
系统: Mac OS X
来自: Tencent
联系:

Re: 求解各位大神:ubuntu12.04安装redmine出现的问题

#2

帖子 枫叶饭团 »

没装ruby那个安装工具gem?
nogoodbye
帖子: 3
注册时间: 2012-07-26 17:15

Re: 求解各位大神:ubuntu12.04安装redmine出现的问题

#3

帖子 nogoodbye »

枫叶饭团 写了:没装ruby那个安装工具gem?
我装了呢,rubygems是1.7.2的,在这之前的步骤中我就是用gem install rails -v 2.3.14语句安装rails的。
jscoxin
帖子: 3
注册时间: 2012-09-16 5:51
系统: Ubuntu

Re: 求解各位大神:ubuntu12.04安装redmine出现的问题

#4

帖子 jscoxin »

http://comments.gmane.org/gmane.org.use ... lugc/74292


Check whether libmysqlclient-dev is installed .


應該是這個「libmysqlclient-dev」套件沒有安裝...
jscoxin
帖子: 3
注册时间: 2012-09-16 5:51
系统: Ubuntu

Re: 求解各位大神:ubuntu12.04安装redmine出现的问题

#5

帖子 jscoxin »

===================================================================================
另外
pg(postgresql)好像也會出現,
An error occurred while installing pg (0.14.1), and Bundler cannot continue.
Make sure that `gem install pg -v '0.14.1'` succeeds before bundling.

也是要編譯時,少了dev的套件
可以看下面檔案的訊息
gems/pg-0.14.1/ext/gem_make.out

會發現這一行
You need to install postgresql-server-dev-X.Y for building a server-side extension or libpq-dev for building a client-side application.

$ sudo apt-get install postgresql-server-dev-all libpq-dev


sqlite3也會
An error occurred while installing sqlite3 (1.3.6), and Bundler cannot continue.
Make sure that `gem install sqlite3 -v '1.3.6'` succeeds before bundling.

gems/sqlite3-1.3.6/ext/sqlite3/gem_make.out

$ sudo apt-get install libsqlite3-dev

以此類推....
看gem_make.out,查出少了哪個develop套件,因為編譯需要,
安裝他,就可以解決了
Ubuntu底下的develop套件,通常都是lib開頭,dev結尾,很有一致性,沒有就只好求搜尋大神
===================================================================================
jscoxin
帖子: 3
注册时间: 2012-09-16 5:51
系统: Ubuntu

Re: 求解各位大神:ubuntu12.04安装redmine出现的问题

#6

帖子 jscoxin »

應該是沒有安裝「libmysqlclient-dev」

http://comments.gmane.org/gmane.org.use ... lugc/74292
Check whether libmysqlclient-dev is installed .

$ sudo apt-get install libmysqlclient-dev

應該就OK了
nogoodbye
帖子: 3
注册时间: 2012-07-26 17:15

Re: 求解各位大神:ubuntu12.04安装redmine出现的问题

#7

帖子 nogoodbye »

jscoxin 写了:應該是沒有安裝「libmysqlclient-dev」

http://comments.gmane.org/gmane.org.use ... lugc/74292
Check whether libmysqlclient-dev is installed .

$ sudo apt-get install libmysqlclient-dev

應該就OK了

谢了,我已经解决了,不过我现在忘了是怎么解决的。
回复