在Ubuntu Precise中安装ruby-gsl

时间:2013-01-24 22:48:20

标签: ruby ubuntu-12.04 lapack blas gsl

我有Ubuntu Precise,无法在软件仓库中找到任何lapack或blas。我跑的时候

sudo gem install gsl

我收到错误输出。我有gsl 1.15。输出如下

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

        /usr/bin/ruby1.8 extconf.rb
checking gsl version... 1.15
checking gsl cflags... -I/usr/include
checking for main() in -lcblas... no
checking gsl libs... -L/usr/lib -lgsl -lgslcblas -lm
checking for round()... no
checking for rngextra/rngextra.h... no
checking for qrngextra/qrngextra.h... no
checking for ool/ool_version.h... no
checking for tensor/tensor.h... no
checking for jacobi.h... no
checking for gsl/gsl_cqp.h... no
checking for gsl/gsl_multimin_fsdf.h... no
checking for gsl_poly_solve_quartic() in -lgsl... no
checking for gsl_eigen_francis() in -lgsl... yes
checking for ndlinear/gsl_multifit_ndlinear.h... no
checking for alf/alf.h... no
checking rb-gsl version...1.14.7
checking ruby version... 1.8.7
checking for graph... yes
NOTE: Gem.searcher is deprecated, use Specification. It will be removed on or after 2011-11-01.
Gem.searcher called from extconf.rb:245.
NOTE: Gem::GemPathSearcher#initialize is deprecated with no replacement. It will be removed on or after 2011-10-01.
Gem::GemPathSearcher#initialize called from /usr/lib/ruby/vendor_ruby/1.8/rubygems.rb:951.
NOTE: Gem::GemPathSearcher#find is deprecated with no replacement. It will be removed on or after 2011-10-01.
Gem::GemPathSearcher#find called from extconf.rb:245.
checking for narray.h... yes
checking for tamu_anova/tamu_anova.h... no
checking for main() in -ltamuanova... no
creating Makefile

make
gcc -I. -I. -I/usr/lib/ruby/1.8/x86_64-linux -I. -DHAVE_NARRAY_H  -I/var/lib/gems/1.8/gems/narray-0.6.0.4/. -I/usr/local/lib/site_ruby/1.8/x86_64-linux -D_FORTIFY_SOURCE=2  -D_FORTIFY_SOURCE=2 -fPIC  -Wall -I../include  -I/usr/include  -c sf_zeta.c
gcc -I. -I. -I/usr/lib/ruby/1.8/x86_64-linux -I. -DHAVE_NARRAY_H  -I/var/lib/gems/1.8/gems/narray-0.6.0.4/. -I/usr/local/lib/site_ruby/1.8/x86_64-linux -D_FORTIFY_SOURCE=2  -D_FORTIFY_SOURCE=2 -fPIC  -Wall -I../include  -I/usr/include  -c histogram3d.c
gcc -I. -I. -I/usr/lib/ruby/1.8/x86_64-linux -I. -DHAVE_NARRAY_H  -I/var/lib/gems/1.8/gems/narray-0.6.0.4/. -I/usr/local/lib/site_ruby/1.8/x86_64-linux -D_FORTIFY_SOURCE=2  -D_FORTIFY_SOURCE=2 -fPIC  -Wall -I../include  -I/usr/include  -c matrix.c
In file included from matrix.c:31:0:
matrix_source.c: In function ‘rb_gsl_matrix_to_s’:
matrix_source.c:878:11: warning: variable ‘min’ set but not used [-Wunused-but-set-variable]
gcc -I. -I. -I/usr/lib/ruby/1.8/x86_64-linux -I. -DHAVE_NARRAY_H  -I/var/lib/gems/1.8/gems/narray-0.6.0.4/. -I/usr/local/lib/site_ruby/1.8/x86_64-linux -D_FORTIFY_SOURCE=2  -D_FORTIFY_SOURCE=2 -fPIC  -Wall -I../include  -I/usr/include  -c siman.c
siman.c: In function ‘rb_gsl_siman_solver_solve’:
siman.c:572:38: warning: variable ‘ppp’ set but not used [-Wunused-but-set-variable]
gcc -I. -I. -I/usr/lib/ruby/1.8/x86_64-linux -I. -DHAVE_NARRAY_H  -I/var/lib/gems/1.8/gems/narray-0.6.0.4/. -I/usr/local/lib/site_ruby/1.8/x86_64-linux -D_FORTIFY_SOURCE=2  -D_FORTIFY_SOURCE=2 -fPIC  -Wall -I../include  -I/usr/include  -c deriv.c
gcc -I. -I. -I/usr/lib/ruby/1.8/x86_64-linux -I. -DHAVE_NARRAY_H  -I/var/lib/gems/1.8/gems/narray-0.6.0.4/. -I/usr/local/lib/site_ruby/1.8/x86_64-linux -D_FORTIFY_SOURCE=2  -D_FORTIFY_SOURCE=2 -fPIC  -Wall -I../include  -I/usr/include  -c sort.c
gcc -I. -I. -I/usr/lib/ruby/1.8/x86_64-linux -I. -DHAVE_NARRAY_H  -I/var/lib/gems/1.8/gems/narray-0.6.0.4/. -I/usr/local/lib/site_ruby/1.8/x86_64-linux -D_FORTIFY_SOURCE=2  -D_FORTIFY_SOURCE=2 -fPIC  -Wall -I../include  -I/usr/include  -c sf_dilog.c
sf_dilog.c: In function ‘rb_gsl_sf_complex_dilog_e’:
sf_dilog.c:29:7: warning: variable ‘status’ set but not used [-Wunused-but-set-variable]
gcc -I. -I. -I/usr/lib/ruby/1.8/x86_64-linux -I. -DHAVE_NARRAY_H  -I/var/lib/gems/1.8/gems/narray-0.6.0.4/. -I/usr/local/lib/site_ruby/1.8/x86_64-linux -D_FORTIFY_SOURCE=2  -D_FORTIFY_SOURCE=2 -fPIC  -Wall -I../include  -I/usr/include  -c const_additional.c
gcc -I. -I. -I/usr/lib/ruby/1.8/x86_64-linux -I. -DHAVE_NARRAY_H  -I/var/lib/gems/1.8/gems/narray-0.6.0.4/. -I/usr/local/lib/site_ruby/1.8/x86_64-linux -D_FORTIFY_SOURCE=2  -D_FORTIFY_SOURCE=2 -fPIC  -Wall -I../include  -I/usr/include  -c nmf_wrap.c
gcc -I. -I. -I/usr/lib/ruby/1.8/x86_64-linux -I. -DHAVE_NARRAY_H  -I/var/lib/gems/1.8/gems/narray-0.6.0.4/. -I/usr/local/lib/site_ruby/1.8/x86_64-linux -D_FORTIFY_SOURCE=2  -D_FORTIFY_SOURCE=2 -fPIC  -Wall -I../include  -I/usr/include  -c sf_airy.c
gcc -I. -I. -I/usr/lib/ruby/1.8/x86_64-linux -I. -DHAVE_NARRAY_H  -I/var/lib/gems/1.8/gems/narray-0.6.0.4/. -I/usr/local/lib/site_ruby/1.8/x86_64-linux -D_FORTIFY_SOURCE=2  -D_FORTIFY_SOURCE=2 -fPIC  -Wall -I../include  -I/usr/include  -c bspline.c
gcc -I. -I. -I/usr/lib/ruby/1.8/x86_64-linux -I. -DHAVE_NARRAY_H  -I/var/lib/gems/1.8/gems/narray-0.6.0.4/. -I/usr/local/lib/site_ruby/1.8/x86_64-linux -D_FORTIFY_SOURCE=2  -D_FORTIFY_SOURCE=2 -fPIC  -Wall -I../include  -I/usr/include  -c matrix_double.c
gcc -I. -I. -I/usr/lib/ruby/1.8/x86_64-linux -I. -DHAVE_NARRAY_H  -I/var/lib/gems/1.8/gems/narray-0.6.0.4/. -I/usr/local/lib/site_ruby/1.8/x86_64-linux -D_FORTIFY_SOURCE=2  -D_FORTIFY_SOURCE=2 -fPIC  -Wall -I../include  -I/usr/include  -c sf_mathieu.c
gcc -I. -I. -I/usr/lib/ruby/1.8/x86_64-linux -I. -DHAVE_NARRAY_H  -I/var/lib/gems/1.8/gems/narray-0.6.0.4/. -I/usr/local/lib/site_ruby/1.8/x86_64-linux -D_FORTIFY_SOURCE=2  -D_FORTIFY_SOURCE=2 -fPIC  -Wall -I../include  -I/usr/include  -c const.c
gcc -I. -I. -I/usr/lib/ruby/1.8/x86_64-linux -I. -DHAVE_NARRAY_H  -I/var/lib/gems/1.8/gems/narray-0.6.0.4/. -I/usr/local/lib/site_ruby/1.8/x86_64-linux -D_FORTIFY_SOURCE=2  -D_FORTIFY_SOURCE=2 -fPIC  -Wall -I../include  -I/usr/include  -c dht.c
gcc -I. -I. -I/usr/lib/ruby/1.8/x86_64-linux -I. -DHAVE_NARRAY_H  -I/var/lib/gems/1.8/gems/narray-0.6.0.4/. -I/usr/local/lib/site_ruby/1.8/x86_64-linux -D_FORTIFY_SOURCE=2  -D_FORTIFY_SOURCE=2 -fPIC  -Wall -I../include  -I/usr/include  -c root.c
gcc -I. -I. -I/usr/lib/ruby/1.8/x86_64-linux -I. -DHAVE_NARRAY_H  -I/var/lib/gems/1.8/gems/narray-0.6.0.4/. -I/usr/local/lib/site_ruby/1.8/x86_64-linux -D_FORTIFY_SOURCE=2  -D_FORTIFY_SOURCE=2 -fPIC  -Wall -I../include  -I/usr/include  -c signal.c
signal.c: In function ‘rb_gsl_fft_conv_corr’:
signal.c:108:28: warning: variable ‘stride3’ set but not used [-Wunused-but-set-variable]
gcc -I. -I. -I/usr/lib/ruby/1.8/x86_64-linux -I. -DHAVE_NARRAY_H  -I/var/lib/gems/1.8/gems/narray-0.6.0.4/. -I/usr/local/lib/site_ruby/1.8/x86_64-linux -D_FORTIFY_SOURCE=2  -D_FORTIFY_SOURCE=2 -fPIC  -Wall -I../include  -I/usr/include  -c ool.c
gcc -I. -I. -I/usr/lib/ruby/1.8/x86_64-linux -I. -DHAVE_NARRAY_H  -I/var/lib/gems/1.8/gems/narray-0.6.0.4/. -I/usr/local/lib/site_ruby/1.8/x86_64-linux -D_FORTIFY_SOURCE=2  -D_FORTIFY_SOURCE=2 -fPIC  -Wall -I../include  -I/usr/include  -c gsl.c
gcc -I. -I. -I/usr/lib/ruby/1.8/x86_64-linux -I. -DHAVE_NARRAY_H  -I/var/lib/gems/1.8/gems/narray-0.6.0.4/. -I/usr/local/lib/site_ruby/1.8/x86_64-linux -D_FORTIFY_SOURCE=2  -D_FORTIFY_SOURCE=2 -fPIC  -Wall -I../include  -I/usr/include  -c fft.c
fft.c: In function ‘rb_fft_complex_trans’:
fft.c:466:17: warning: variable ‘status’ set but not used [-Wunused-but-set-variable]
fft.c: In function ‘rb_gsl_fft_complex_transform’:
fft.c:500:17: warning: variable ‘status’ set but not used [-Wunused-but-set-variable]
fft.c: In function ‘rb_gsl_fft_complex_transform2’:
fft.c:520:17: warning: variable ‘status’ set but not used [-Wunused-but-set-variable]
fft.c: In function ‘rb_fft_real_trans’:
fft.c:669:17: warning: variable ‘status’ set but not used [-Wunused-but-set-variable]
fft.c: In function ‘rb_fft_halfcomplex_trans’:
fft.c:733:17: warning: variable ‘status’ set but not used [-Wunused-but-set-variable]
gcc -I. -I. -I/usr/lib/ruby/1.8/x86_64-linux -I. -DHAVE_NARRAY_H  -I/var/lib/gems/1.8/gems/narray-0.6.0.4/. -I/usr/local/lib/site_ruby/1.8/x86_64-linux -D_FORTIFY_SOURCE=2  -D_FORTIFY_SOURCE=2 -fPIC  -Wall -I../include  -I/usr/include  -c stats.c
gcc -I. -I. -I/usr/lib/ruby/1.8/x86_64-linux -I. -DHAVE_NARRAY_H  -I/var/lib/gems/1.8/gems/narray-0.6.0.4/. -I/usr/local/lib/site_ruby/1.8/x86_64-linux -D_FORTIFY_SOURCE=2  -D_FORTIFY_SOURCE=2 -fPIC  -Wall -I../include  -I/usr/include  -c rng.c
gcc -I. -I. -I/usr/lib/ruby/1.8/x86_64-linux -I. -DHAVE_NARRAY_H  -I/var/lib/gems/1.8/gems/narray-0.6.0.4/. -I/usr/local/lib/site_ruby/1.8/x86_64-linux -D_FORTIFY_SOURCE=2  -D_FORTIFY_SOURCE=2 -fPIC  -Wall -I../include  -I/usr/include  -c randist.c
gcc -I. -I. -I/usr/lib/ruby/1.8/x86_64-linux -I. -DHAVE_NARRAY_H  -I/var/lib/gems/1.8/gems/narray-0.6.0.4/. -I/usr/local/lib/site_ruby/1.8/x86_64-linux -D_FORTIFY_SOURCE=2  -D_FORTIFY_SOURCE=2 -fPIC  -Wall -I../include  -I/usr/include  -c oper_complex_source.c
gcc -I. -I. -I/usr/lib/ruby/1.8/x86_64-linux -I. -DHAVE_NARRAY_H  -I/var/lib/gems/1.8/gems/narray-0.6.0.4/. -I/usr/local/lib/site_ruby/1.8/x86_64-linux -D_FORTIFY_SOURCE=2  -D_FORTIFY_SOURCE=2 -fPIC  -Wall -I../include  -I/usr/include  -c multiset.c
gcc -I. -I. -I/usr/lib/ruby/1.8/x86_64-linux -I. -DHAVE_NARRAY_H  -I/var/lib/gems/1.8/gems/narray-0.6.0.4/. -I/usr/local/lib/site_ruby/1.8/x86_64-linux -D_FORTIFY_SOURCE=2  -D_FORTIFY_SOURCE=2 -fPIC  -Wall -I../include  -I/usr/include  -c sf_lambert.c
gcc -I. -I. -I/usr/lib/ruby/1.8/x86_64-linux -I. -DHAVE_NARRAY_H  -I/var/lib/gems/1.8/gems/narray-0.6.0.4/. -I/usr/local/lib/site_ruby/1.8/x86_64-linux -D_FORTIFY_SOURCE=2  -D_FORTIFY_SOURCE=2 -fPIC  -Wall -I../include  -I/usr/include  -c histogram_oper.c
gcc -I. -I. -I/usr/lib/ruby/1.8/x86_64-linux -I. -DHAVE_NARRAY_H  -I/var/lib/gems/1.8/gems/narray-0.6.0.4/. -I/usr/local/lib/site_ruby/1.8/x86_64-linux -D_FORTIFY_SOURCE=2  -D_FORTIFY_SOURCE=2 -fPIC  -Wall -I../include  -I/usr/include  -c alf.c
gcc -I. -I. -I/usr/lib/ruby/1.8/x86_64-linux -I. -DHAVE_NARRAY_H  -I/var/lib/gems/1.8/gems/narray-0.6.0.4/. -I/usr/local/lib/site_ruby/1.8/x86_64-linux -D_FORTIFY_SOURCE=2  -D_FORTIFY_SOURCE=2 -fPIC  -Wall -I../include  -I/usr/include  -c array.c
array.c: In function ‘cvector_set_from_narray’:
array.c:260:7: warning: variable ‘size’ set but not used [-Wunused-but-set-variable]
gcc -I. -I. -I/usr/lib/ruby/1.8/x86_64-linux -I. -DHAVE_NARRAY_H  -I/var/lib/gems/1.8/gems/narray-0.6.0.4/. -I/usr/local/lib/site_ruby/1.8/x86_64-linux -D_FORTIFY_SOURCE=2  -D_FORTIFY_SOURCE=2 -fPIC  -Wall -I../include  -I/usr/include  -c sf_coulomb.c
sf_coulomb.c: In function ‘rb_gsl_sf_hydrogenicR_e’:
sf_coulomb.c:38:7: warning: variable ‘status’ set but not used [-Wunused-but-set-variable]
sf_coulomb.c: In function ‘rb_gsl_sf_coulomb_wave_FG_array’:
sf_coulomb.c:90:16: warning: variable ‘stride’ set but not used [-Wunused-but-set-variable]
sf_coulomb.c: In function ‘rb_gsl_sf_coulomb_wave_FGp_array’:
sf_coulomb.c:115:16: warning: variable ‘stride’ set but not used [-Wunused-but-set-variable]
sf_coulomb.c: In function ‘rb_gsl_sf_coulomb_CL_array’:
sf_coulomb.c:168:7: warning: variable ‘status’ set but not used [-Wunused-but-set-variable]
gcc -I. -I. -I/usr/lib/ruby/1.8/x86_64-linux -I. -DHAVE_NARRAY_H  -I/var/lib/gems/1.8/gems/narray-0.6.0.4/. -I/usr/local/lib/site_ruby/1.8/x86_64-linux -D_FORTIFY_SOURCE=2  -D_FORTIFY_SOURCE=2 -fPIC  -Wall -I../include  -I/usr/include  -c sf_debye.c
gcc -I. -I. -I/usr/lib/ruby/1.8/x86_64-linux -I. -DHAVE_NARRAY_H  -I/var/lib/gems/1.8/gems/narray-0.6.0.4/. -I/usr/local/lib/site_ruby/1.8/x86_64-linux -D_FORTIFY_SOURCE=2  -D_FORTIFY_SOURCE=2 -fPIC  -Wall -I../include  -I/usr/include  -c multimin_fsdf.c
gcc -I. -I. -I/usr/lib/ruby/1.8/x86_64-linux -I. -DHAVE_NARRAY_H  -I/var/lib/gems/1.8/gems/narray-0.6.0.4/. -I/usr/local/lib/site_ruby/1.8/x86_64-linux -D_FORTIFY_SOURCE=2  -D_FORTIFY_SOURCE=2 -fPIC  -Wall -I../include  -I/usr/include  -c sf_elementary.c
sf_elementary.c: In function ‘rb_gsl_sf_multiply_e’:
sf_elementary.c:19:7: warning: variable ‘status’ set but not used [-Wunused-but-set-variable]
sf_elementary.c: In function ‘rb_gsl_sf_multiply_err_e’:
sf_elementary.c:31:7: warning: variable ‘status’ set but not used [-Wunused-but-set-variable]
gcc -I. -I. -I/usr/lib/ruby/1.8/x86_64-linux -I. -DHAVE_NARRAY_H  -I/var/lib/gems/1.8/gems/narray-0.6.0.4/. -I/usr/local/lib/site_ruby/1.8/x86_64-linux -D_FORTIFY_SOURCE=2  -D_FORTIFY_SOURCE=2 -fPIC  -Wall -I../include  -I/usr/include  -c poly2.c
gcc -I. -I. -I/usr/lib/ruby/1.8/x86_64-linux -I. -DHAVE_NARRAY_H  -I/var/lib/gems/1.8/gems/narray-0.6.0.4/. -I/usr/local/lib/site_ruby/1.8/x86_64-linux -D_FORTIFY_SOURCE=2  -D_FORTIFY_SOURCE=2 -fPIC  -Wall -I../include  -I/usr/include  -c blas1.c

有没有人建议我缺少什么或如何安装ruby-gsl并让它工作?

1 个答案:

答案 0 :(得分:0)

这家伙有类似的问题:Problems installing gsl gem

从最佳答案来看,似乎gsl 1.15与ruby-gsl不兼容,并且恢复到版本1.14是必要的吗?你提到你在帖子中使用gsl 1.15,那么这可能是你的问题吗?