编译安装 R-3.4.1.tar.gz
将R语言安装包拖入虚拟机中Ubuntu Kylin 16.04系统中:
然后查找语言包的位置:
sudo find / -name R-3.4.1.tar.gz
解压文件:
sudo tar -zxvf R-3.4.1.tar.gz
进入解压后的文件夹:
sudo cd R-3.4.1
源码编译安装第一步:检查环境以及依赖
sudo ./configure
报错排查:
报错1
configure: error: No F77 compiler found
缺少编译器,解决办法:
sudo apt-get install gfortran
另外还需要安装gcc等工具:
sudo apt-get install build-essential
报错2
configure: error: –with-readline=yes (default) and headers/libs are not available
解决方案:安装readline
sudo apt-get install libreadline-dev
报错3
configure: error: –with-x=yes (default) and X11 headers/libs are no t available
解决方案:安装libxt-dev
sudo apt-get install libxt-dev
报错4
configure: error: zlib library and headers are required
解决方案:源码编译安装zlib
sudo wget http://zlib.net/zlib-1.2.11.tar.gz
sudo tar xzvf zlib-1.2.8.tar.gz
sudo cd zlib-1.2.8
sudo ./configure
sudo make
sudo make install
报错5
configure: error: bzip2 library and headers are required
解决方案:源码编译安装bzip2
sudo wget http://www.bzip.org/1.0.6/bzip2-1.0.6.tar.gz
sudo tar -xzvf bzip2-1.0.6.tar.gz
sudo cd bzip2-1.0.6
sudo make install
报错6
configure: error: "liblzma library and headers are required"
解决方案:安装xz
sudo wget http://tukaani.org/xz/xz-5.2.2.tar.gz
sudo tar xzvf xz-5.2.2.tar.gz
sudo cd xz-5.2.2
sudo ./configure
sudo make
sudo make install
报错7
configure: error: pcre >= 8.20 library and headers are required
解决方案:pcre版本过低,安装pcre-8.41.tar.gz
sudo wget http://ftp.exim.llorien.org/pcre/pcre-8.41.tar.gz
sudo tar -zxvf pcre-8.39.tar.gz
sudo cd pcre-8.39
sudo ./configure
sudo make
sudo make install
错误总算排查完了,继续安装R
源码编译安装第一步:检查环境以及依赖
sudo ./configure