gpt4 book ai didi

c - 使用 Cygwin 安装 rb-gsl gem

转载 作者:行者123 更新时间:2023-11-30 18:06:20 24 4
gpt4 key购买 nike

我在 Windows 下使用 Cygwin 安装 rb-gsl 时遇到问题。我正在使用适用于 Windows 的 RubyInstaller,并安装了开发工具包。我已经安装了 Cygwin 和 GSL 运行时、gsl-apps、gsl-devel 和 gsl-doc 软件包。当发出 gem install 命令时,我得到以下信息:

$ gem.bat install "C:\Documents and Settings\jzh3fd.2UA1071FGF\Desktop\gsl-1.14
.7.gem"
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing C:\Documents and Settings\jzh3fd.2UA1071FGF\Desktop\gsl
-1.14.7.gem:
ERROR: Failed to build gem native extension.

C:/Ruby192/bin/ruby.exe extconf.rb
checking gsl version... 1.14
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... no
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.9.2
checking for graph... no
checking for narray.h... yes
checking for main() in -lnarray... no
checking for tamu_anova/tamu_anova.h... no
checking for main() in -ltamuanova... no
creating Makefile

make
C:/Ruby192/bin/ruby -e "puts 'EXPORTS', 'Init_rb_gsl'" > rb_gsl-i386-mingw32.de
f
gcc -I. -IC:/Ruby192/include/ruby-1.9.1/i386-mingw32 -I/C/Ruby192/include/ruby-1
.9.1/ruby/backward -I/C/Ruby192/include/ruby-1.9.1 -I. -DHAVE_NARRAY_H -IC:/Rub
y192/lib/ruby/gems/1.9.1/gems/narray-0.5.9.9/. -IC:/Ruby192/lib/ruby/site_ruby/1
.9.1/i386-msvcrt -Wall -I../include -I/usr/include -o alf.o -c alf.c
gcc -I. -IC:/Ruby192/include/ruby-1.9.1/i386-mingw32 -I/C/Ruby192/include/ruby-1
.9.1/ruby/backward -I/C/Ruby192/include/ruby-1.9.1 -I. -DHAVE_NARRAY_H -IC:/Rub
y192/lib/ruby/gems/1.9.1/gems/narray-0.5.9.9/. -IC:/Ruby192/lib/ruby/site_ruby/1
.9.1/i386-msvcrt -Wall -I../include -I/usr/include -o array.o -c array.c
In file included from array.c:14:0:
../include/rb_gsl_common.h:18:27: fatal error: gsl/gsl_errno.h: No such file or
directory
compilation terminated.
make: *** [array.o] Error 1


Gem files will remain installed in C:/Ruby192/lib/ruby/gems/1.9.1/gems/gsl-1.14.
7 for inspection.
Results logged to C:/Ruby192/lib/ruby/gems/1.9.1/gems/gsl-1.14.7/ext/gem_make.ou
t

我已经检查过,可以在/usr/include/gsl 找到 gsl_errno.h

最佳答案

尝试在安装 gem 时在命令行上提供 GSL 包含的路径。

gem install gsl -- --with-gsl-include-path=/usr/include/gsl

关于c - 使用 Cygwin 安装 rb-gsl gem,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5624185/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com