Ubuntu 上R包安裝問題彙總
Linux 上安裝R包出錯後一般會有以下的提示
1、Ubuntu R 安裝rgdal 出錯
apt-get install gdal-bin
apt-get install libxml2
apt-get install libxml2-dev
apt-get install libgdal1-dev
sudo apt-get install libgdal1-dev libproj-dev
2、Ubuntu R 安裝Cairo 出錯
sudo apt-get install libcairo2-devapt-get install gcc
apt-get install gcc++
sudo apt-get install libghc-x11-dev
3、安裝sparklyr出錯
sudo apt-get install libcurl4-openssl-dev libssl-dev
sudo apt-get install libxml2-dev
sudo apt-get install libcurl4-gnutls-dev
4、安裝依賴protobuf的包出現錯誤
If protobuf is already installed, check that 'pkg-config' is in your
PATH and PKG_CONFIG_PATH contains a protobuf.pc file
apt-get install protobuf-compiler
apt-get install libprotobuf-dev
下載
hadoop使用protocol buffer進行通訊,需要下載和安裝protobuf-2.5.0.tar.gz。由於 現在 protobuf-2.5.0.tar.gz已經無法在官網https://code.google.com/p/protobuf/downloads/list中 下載了,本人將 protobuf-2.5.0.tar.gz上傳到百度雲盤供大家下載,地址: http://pan.baidu.com/s/1pJlZubT
安裝
使用tar -zxf protobuf-2.5.0.tar.gz命令解壓後得到是 protobuf-2.5.0的原始碼,
cd protobuf-2.5.0 進入目錄
假如 你希望編譯成功後輸出的目錄 為 /usr/local/protobuf/ 則輸入如下兩條命令:
./configure --prefix=/usr/local/protobuf/
make && make install
編譯成功後將export PATH= /usr/local/protobuf/bin:$PATH加入到環境變數中
source /etc/profile
最後輸入 protoc --version命令,如顯示libprotoc 2.5.0則安裝成功
5、安裝jqr出錯
sudo add-apt-repository -y ppa:opencpu/jq
sudo apt-get update -q
sudo apt-get install -y libjq-dev
在Ubuntu下,時不時會有這個錯誤的。 add-apt-repository: command not found
這個是缺少程式,安裝一下就可以了。只是不知道安裝的名字。
- $ sudo apt-get install software-properties-common python-software-properties
6、udunits2 安裝出錯
-----Error: libudunits2.a not found-----
If the udunits2 library is installed in a non-standard location,
use --configure-args='--with-udunits2-lib=/usr/local/lib' for example,
or --configure-args='--with-udunits2-include=/usr/include/udunits2'
replacing paths with appropriate values for your installation.
You can alternatively use the UDUNITS2_INCLUDE and UDUNITS2_LIB
environment variables.
If udunits2 is not installed, please install it.
It is required for this package.
ERROR: configuration failed for package ‘udunits2’
sudo apt-get install libudunits2-dev