【问题标题】:i am unable to install rvest package in rstudio我无法在 rstudio 中安装 rvest 包
【发布时间】:2020-08-13 13:48:35
【问题描述】:

所以我想在我的 rstudio 中安装 rvest 包,但不能像它所说的那样先在我的系统上安装一些包,我使用了这个 -->

sudo apt-get install libssl-dev

这已被执行,但在此之后也出现错误-->

 ------------------------- 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=...'
--------------------------------------------------------------------

------------------------- ANTICONF ERROR ---------------------------
Configuration failed because openssl was not found. Try installing:
 * deb: libssl-dev (Debian, Ubuntu, etc)
 * rpm: openssl-devel (Fedora, CentOS, RHEL)
 * csw: libssl_dev (Solaris)
 * brew: openssl@1.1 (Mac OSX)
If openssl is already installed, check that 'pkg-config' is in your
PATH and PKG_CONFIG_PATH contains a openssl.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=...'
--------------------------------------------------------------------

所以我尝试安装然后使用 -->

sudo apt-get install libcurl4-openssl-dev 
sudo apt-get install libssl-dev 

但这些都不起作用,错误是 -->

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Suggested packages:
  libcurl4-doc libidn11-dev libkrb5-dev libldap2-dev librtmp-dev libssh2-1-dev libssl-dev
The following NEW packages will be installed:
  libcurl4-openssl-dev
0 upgraded, 1 newly installed, 0 to remove and 31 not upgraded.
Need to get 318 kB of archives.
After this operation, 1,508 kB of additional disk space will be used.
Ign:1 http://in.archive.ubuntu.com/ubuntu disco-updates/main amd64 libcurl4-openssl-dev amd64 7.64.0-2ubuntu1.2
Err:1 http://security.ubuntu.com/ubuntu disco-updates/main amd64 libcurl4-openssl-dev amd64 7.64.0-2ubuntu1.2
  404  Not Found [IP: 2403:8940:ffff::f 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/c/curl/libcurl4-openssl-dev_7.64.0-2ubuntu1.2_amd64.deb  404  Not Found [IP: 2403:8940:ffff::f 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

然后我也尝试使用这两个 -->

sudo apt-get update
sudo apt-get install libcurl4-openssl-dev --fix-missing

如何解决这个问题?

【问题讨论】:

    标签: r ubuntu rvest rstudio-server ubuntu-19.04


    【解决方案1】:

    您只是遇到了网络问题。它无法连接到 security,ubuntu.com。

    也不是说许多关键包已经在发行版中所以就这样做

    sudo apt install r-cran-rvest
    

    这在 19.10 对我有用,在 19.04 也可能对你有用(你应该从它升级)。

    【讨论】:

    • Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package r-cran-rvest 在尝试了你的解决方案之后,这就是我得到的
    • 好的,所以可能是 19.04 没有它。做apt-cache search r-cran-rvest(或r-cran-policy r-cran-rvest)。它可能会有r-cran-httrr-cran-curl,所以你可以至少省下这一步,然后从CRAN 安装rvest
    • 这不显示任何输出并且仍然无法安装rvest
    • 抱歉,打错了:第二个命令必须是:apt-cache policy r-cran-rvest。用httrcurl 替换其中的rvest。也可以看看一些 Debian 或 Ubuntu 教程(或 StackOverflow 问题)——软件包系统非常强大。充分利用它。
    猜你喜欢
    • 2015-09-09
    • 2018-12-24
    • 1970-01-01
    • 1970-01-01
    • 2022-07-04
    • 2017-10-12
    • 2019-01-18
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多