当前位置: 首页 > 工具软件 > GNU Units > 使用案例 >

R在安装units时出现错误,提示未安装“udunits”,安装udunits后提示ERROR: configuration failed for package ‘udunits2’

史智志
2023-12-01

2018.9.10


configure: error: in `/tmp/Rtmp79GfU8/R.INSTALL56a968302bf8/units':

configure: error:

--------------------------------------------------------------------------------

libudunits2.so not found!

 

If the udunits2 library is installed in a non-standard location, use:

 

--configure-args='--with-udunits2-lib=/usr/local/lib'

 

for example, if the library was not found, and/or

 

--configure-args='--with-udunits2-include=/usr/include/udunits2'

 

if the header was not found, replacing paths with appropriate values for your

installation. You can alternatively use the UDUNITS2_INCLUDE and UDUNITS2_LIBS

environment variables.

 

If udunits2 is not installed, please install it.

It is required for this package.

 

#装“udunits2”

biocLite("udunits2")

ERROR: configuration failed for package ‘udunits2’

* removing ‘/home/qcsdxn/R/x86_64-pc-linux-gnu-library/3.5/udunits2’

# 在终端输入sudo apt install libudunits2-dev

qcsdxn@qcsdxn-Precision-7820-Tower:~$ sudo apt install libudunits2-dev

再此安装进行安装即可。

  • 总结: 在安装包出错时,要看看error下面的解释,例如:安装“units”包时error后显示“ If udunits2 is not installed, please install it.”在biocLite("udunits2")error后显示“ERROR: configuration failed for package ‘udunits2’”,此时就像安装champ包遇到的问题一样,在终端输入“ sudo apt install libudunits2-dev”即可
 类似资料: