2012-02-08 72 views
1

我试图上的OpenIndiana 151安装mysql2宝石没有成功:(上的OpenIndiana 151

我已经安装了MySQL 5.1服务器/客户机/库软件包安装MySql2宝石:

$ pkg list | grep mysql 
database/mysql-51        5.1.37-0.151.1 installed ----- 
database/mysql-51/library      5.1.37-0.151.1 installed ----- 
database/mysql-common       0.5.11-0.151.1 installed ----- 

但是,当我尝试安装宝石:

gem install mysql2 -v '0.2.17' -- --with-mysql-config=/usr/mysql/5.1/bin/mysql_config 

我得到以下输出:

Building native extensions. This could take a while... 
ERROR: Error installing mysql2: 
     ERROR: Failed to build gem native extension. 

     /home/aburns/.rvm/rubies/ruby-1.9.2-p290/bin/ruby extconf.rb --with-mysql-config=/usr/mysql/5.1/bin/mysql_config 
checking for rb_thread_blocking_region()... yes 
checking for rb_wait_for_single_fd()... no 
checking for mysql.h... yes 
checking for errmsg.h... yes 
checking for mysqld_error.h... yes 
creating Makefile 

make 
gcc -I. -I/home/aburns/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1/i386-solaris2.11 -I/home/aburns/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1/ruby/backward -I/home/aburns/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1 -I. -DHAVE_RB_THREAD_BLOCKING_REGION -DHAVE_MYSQL_H -DHAVE_ERRMSG_H -DHAVE_MYSQLD_ERROR_H -I/home/aburns/.rvm/usr/include -D_FILE_OFFSET_BITS=64 -I/usr/mysql/5.1/include/mysql -xprefetch=auto -xprefetch_level=3 -mt -fns=no -fsimple=1 -xbuiltin=%all -xlibmil -xlibmopt -xnorunpath -DHAVE_RWLOCK_T -DUNIV_SOLARIS -fPIC -O3 -g -Wall -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-long-long -fPIC -Wall -funroll-loops -o mysql2_ext.o -c mysql2_ext.c 
gcc: language norunpath not recognized 
gcc: mysql2_ext.c: linker input file unused because linking not done 
[[ snip dependent compile errors ]] 
gcc: mysql2_ext.o: No such file or directory 
gcc: result.o: No such file or directory 
gcc: client.o: No such file or directory 
make: *** [mysql2.so] Error 1 

Gem files will remain installed in /home/aburns/.rvm/gems/[email protected]/gems/mysql2-0.2.17 for inspection. 
Results logged to /home/aburns/.rvm/gems/[email protected]/gems/mysql2-0.2.17/ext/mysql2/gem_make.out 

正如你可以看到GCC失败,gcc:语言norunpath不被识别

我不熟悉GCC我们的本地宝石建筑知道下一步该做什么。

根据我的研究,我认为norunpath是GCC不支持的Sun特定标志;但我不知道如何,或者甚至,我可以删除它。

请指教。

回答

0

我在我的blog前一段时间写的那样:

$ export PATH=/usr/gnu/bin:$PATH 
$ gem install mysql2 -v '0.2.18' -- --with-mysql-dir=/usr/mysql/5.1 --with-mysql-include=/usr/mysql/5.1/include/mysql 
+0

霍莉废话我希望这个作品!感谢Matt,我非常喜欢OI平台,但这对我来说是一个难题。谢谢! – 2012-06-06 16:37:56

+0

是的,这是一个很棒的平台。经历了一些挣扎并且正在运行。我的旅客补丁终于被包含了,乘客3.0.13应该是所有系统都去如果你使用rails应用程序和apache。祝你好运! – 2012-06-07 01:21:45

相关问题