下载后解压完,进入开始配置:
./configure --enable-R-shlib
报错:
configure: error: con--with-readline=yes (default) and headers/libs are not available
然后需要安装依赖的readline:
sudo apt-get install libreadline-dev
sudo apt-get install readline-common
重新configure会报错:
configure: error: --with-x=yes (default) and X11 headers/libs are not available
sudo apt-get install libxt-dev
再来一个PDF相关的,不然会有警告:
sudo apt-get install texinfo
sudo apt-get install texlive
然后使用下面的命令安装:
./configure --prefix=/opt/R-3.x.x --enable-R-shlib
--prefix是说安装到的目录
成功后会显示:
R is now configured for x86_64-unknown-linux-gnu Source directory: . Installation directory: /opt/R-3.2.0 C compiler: gcc -std=gnu99 -g -O2 Fortran 77 compiler: gfortran -g -O2 C++ compiler: g++ -g -O2 C++ 11 compiler: g++ -std=c++11 -g -O2 Fortran 90/95 compiler: gfortran -g -O2 Obj-C compiler: Interfaces supported: X11 External libraries: readline Additional capabilities: NLS Options enabled: shared R library, shared BLAS, R profiling Capabilities skipped: PNG, JPEG, TIFF, cairo, ICU Options not enabled: memory profiling Recommended packages: yes configure: WARNING: neither inconsolata.sty nor zi4.sty found: PDF vignettes and package manuals will not be rendered optimally
http://bbs.pinggu.org/thread-3253312-1-1.html
http://blog.csdn.net/lichangzai/article/details/39272469
时间: 2024-10-08 10:37:45