解决ubuntu 用anaconda 安装R 语言后,无法安装R语言package的问题

info={
系统:ubuntu 17.10
}
错误提示

* installing *source* package ‘quadprog’ ...
** 成功将‘quadprog’程序包解包并MD5和检查
** libs
/home/longsent/anaconda3/bin/x86_64-conda_cos6-linux-gnu-gfortran  -fvisibility=hidden -fpic  -fopenmp -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -pipe -I/home/longsent/anaconda3/include -L/home/longsent/anaconda3/lib  -c aind.f -o aind.o
make: /home/longsent/anaconda3/bin/x86_64-conda_cos6-linux-gnu-gfortran:命令未找到
/home/longsent/anaconda3/lib/R/etc/Makeconf:184: recipe for target 'aind.o' failed
make: *** [aind.o] Error 127
ERROR: compilation failed for package ‘quadprog’
* removing ‘/home/longsent/anaconda3/lib/R/library/quadprog’
Warning in install.packages :
  installation of package ‘quadprog’ had non-zero exit status
ERROR: dependency ‘quadprog’ is not available for package ‘tseries’
* removing ‘/home/longsent/anaconda3/lib/R/library/tseries’
Warning in install.packages :
  installation of package ‘tseries’ had non-zero exit status
  ```


百度没有直接找到解决方法

重装了gcc g++ 以及一系列的cmake 要用到的工具都不行
几天后在stackoverflow上发现了答案
>that is
5
down vote
You can also receive the same error while installing some R packages if R was installed using conda (as I had).
Then just install the package by executing: **conda install gxx_linux-64** to have that command available. 

于是我用了
```shell
conda install gfortran_linux-64

安装完之后,问题就解决了。
看来是anaconda 完全把linux 的很多命令给自己做了,然后cmake 的工具也只能用它的
以后有时间还是要了解一下linux 的运行原理。

猜你喜欢

转载自blog.csdn.net/zhonglong_lin/article/details/79848762