我正在尝试在R上安装'agricolae‘包,但我得到一个错误,说
configure: error: libproj not found in standard or given locations.
ERROR: configuration failed for package ‘sf’
* removing ‘/R/x86_64-pc-linux-gnu-library/3.6/sf’
Warning in install.packages :
installation of package ‘sf’ had non-zero exit status
ERROR: dependency ‘sf’ is not available for package ‘spdep’
* removing ‘/R/x86_64-pc-linux-gnu-library/3.6/spdep’
Warning in install.packages :
installation of package ‘spdep’ had non-zero exit status
ERROR: dependency ‘spdep’ is not available for package ‘agricolae’
* removing ‘/R/x86_64-pc-linux-gnu-library/3.6/agricolae’
Warning in install.packages :
installation of package ‘agricolae’ had non-zero exit status我最近升级到了Ubuntu 18.04.2和R版本3.6.0 (2019-04-26) --“植树”,问题就是从那时开始的。
当我这样做的时候
$ sudo apt-get install -y libproj-dev我得到了:
libproj-dev is already the newest version (5.2.0-1~bionic0).发布于 2019-05-10 11:07:48
该错误指出包'sf‘不可用于依赖项'spdep’。因此,您应该尝试安装pkg 'sf‘。(我和你在同一个操作系统上,pkg:agricolae刚刚安装没有问题。我有一套比你更完整的空间R和系统包。)
编辑:有报道称,为了解决此问题,有必要创建一个指向库位置的环境链接:
$ export LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib (来自:https://stat.ethz.ch/pipermail/r-sig-geo/2018-August/026740.html,它又链接到https://gis.stackexchange.com/questions/157059/repairing-broken-gdal-and-proj-4-on-ubuntu,上面提到了更多的调试选项。)
https://stackoverflow.com/questions/56069794
复制相似问题