如何在R中安装ridge
软件包而不会出现以下未定义的符号错误?
** R
** data
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
Error: package or namespace load failed for ‘ridge’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/home/qwr/R/x86_64-pc-linux-gnu-library/3.4/ridge/libs/ridge.so':
/home/qwr/R/x86_64-pc-linux-gnu-library/3.4/ridge/libs/ridge.so: undefined symbol: regression_wrapper_function
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/home/qwr/R/x86_64-pc-linux-gnu-library/3.4/ridge’
The downloaded source packages are in
‘/tmp/Rtmp5AEXdl/downloaded_packages’
Warning message:
In install.packages("ridge") :
installation of package ‘ridge’ had non-zero exit status
答案 0 :(得分:0)
查看安装消息,我看到必须安装GSL(GNU科学库):
* installing *source* package ‘ridge’ ...
** package ‘ridge’ successfully unpacked and MD5 sums checked
checking for gsl-config... no
configure: WARNING: gsl-config not found, is GSL installed?
configure: WARNING: ridge will be installed but some functions will be unavailable
configure: creating ./config.status
使用sudo apt install libgsl-dev
安装(在Ubuntu 18.04上)