由于Libcurl问题导致无法安装Tidyverse

问题描述 投票:0回答:1

我最近升级到R 3.5并且无法安装'tidyverse'软件包。其他包安装正常。每当我尝试安装tidyverse时,我收到以下错误消息。

* installing *source* package ‘curl’ ...
** package ‘curl’ successfully unpacked and MD5 sums checked
Found pkg-config cflags and libs!
Using PKG_CFLAGS=-I/usr/include/x86_64-linux-gnu
Using PKG_LIBS=-lcurl
------------------------- ANTICONF ERROR ---------------------------
Configuration failed because libcurl was not found. Try installing:
 * deb: libcurl4-openssl-dev (Debian, Ubuntu, etc)
 * rpm: libcurl-devel (Fedora, CentOS, RHEL)
 * csw: libcurl_dev (Solaris)
If libcurl is already installed, check that 'pkg-config' is in your
PATH and PKG_CONFIG_PATH contains a libcurl.pc file. If pkg-config
is unavailable you can set INCLUDE_DIR and LIB_DIR manually via:
R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'
--------------------------------------------------------------------
ERROR: configuration failed for package ‘curl’
* removing ‘/home/nik/anaconda3/lib/R/library/curl’
ERROR: dependency ‘curl’ is not available for package ‘httr’
* removing ‘/home/nik/anaconda3/lib/R/library/httr’
ERROR: dependency ‘httr’ is not available for package ‘rvest’
* removing ‘/home/nik/anaconda3/lib/R/library/rvest’
ERROR: dependencies ‘httr’, ‘rvest’ are not available for package ‘tidyverse’
* removing ‘/home/nik/anaconda3/lib/R/library/tidyverse’

The downloaded source packages are in
    ‘/tmp/RtmpHJ48Sk/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
Warning messages:
1: In install.packages("tidyverse") :
  installation of package ‘curl’ had non-zero exit status
2: In install.packages("tidyverse") :
  installation of package ‘httr’ had non-zero exit status
3: In install.packages("tidyverse") :
  installation of package ‘rvest’ had non-zero exit status
4: In install.packages("tidyverse") :
  installation of package ‘tidyverse’ had non-zero exit status

我已经运行sudo apt-get install libcurl4-openssl-dev,就像其他线程上针对同一问题所建议的那样。但是,这似乎没有解决问题(事实上,已经安装了libcurl,并且重新安装它也无效)。

当我检查$ PATH时,我没有看到'pkg-config',并且PKG_CONFIG_PATH似乎不存在。将/usr/bin/pkg-config添加到路径并设置PKG_CONFIG_PATH /home/nik/anaconda3/lib/pkgconfig/libcurl.pc似乎也没有解决问题。我现在处于智慧状态,因为我无法想到卸载/重新安装的任何其他内容,也没有弄清楚为什么在我安装时没有将libcurl添加到路径中。任何帮助都将不胜感激。

r libcurl tidyverse
1个回答
0
投票

尝试设置包含libcurl的目录的路径,而不是libcurl本身,即

PKG_CONFIG_PATH=/home/nik/anaconda3/lib/pkgconfig
© www.soinside.com 2019 - 2024. All rights reserved.