EVEmodel:致命错误:gsl/gsl_math.h:没有此文件或目录

EVEmodel:致命错误:gsl/gsl_math.h:没有此文件或目录

我在基于 Linux 的服务器上尝试运行 EVE 进行系统发育方差分析。运行编译代码时似乎需要 gsl。因此,我下载了 gsl-2.6 并将其放入相同的工作目录中,但仍然收到相同的错误:初始命令:

gcc EVEmodel.c -o EVEmodel -O3 probabilityfunctions.c treefunctions.c regimefunctions.c myio.c mystat.c bfgs.c -D GSL_RANGE_CHECK_OFF -lm -lgsl -lgslcblas

随后出现了错误,最初导致我下载 gsl:

EVEmodel.c:8:26: fatal error: gsl/gsl_math.h: No such file or directory
 #include <gsl/gsl_math.h>
                          ^
compilation terminated.
probabilityfunctions.c:6:26: fatal error: gsl/gsl_math.h: No such file or directory
 #include <gsl/gsl_math.h>
                          ^
compilation terminated.
In file included from treefunctions.c:11:0:
myio.h:2:28: fatal error: gsl/gsl_matrix.h: No such file or directory
 #include <gsl/gsl_matrix.h>
                            ^
compilation terminated.
regimefunctions.c:4:26: fatal error: gsl/gsl_math.h: No such file or directory
 #include <gsl/gsl_math.h>
                          ^
compilation terminated.
myio.c:2:28: fatal error: gsl/gsl_matrix.h: No such file or directory
 #include <gsl/gsl_matrix.h>
                            ^
compilation terminated.
In file included from mystat.c:8:0:
myio.h:2:28: fatal error: gsl/gsl_matrix.h: No such file or directory
 #include <gsl/gsl_matrix.h>
                            ^
compilation terminated.

欢迎任何反馈。

答案1

你必须安装相应的头文件来自 deb-packages

sudo apt-get install libgsl-dev

然后重试编译。或者使用-L-I标志(请参阅man gcc在线的) 用于本地 GSL 库。

相关内容