无法在Linux Mint 19.3的R 3.6.2中安装httr软件包 [英] Cannot install httr package in R 3.6.2 in Linux Mint 19.3

查看:117
本文介绍了无法在Linux Mint 19.3的R 3.6.2中安装httr软件包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对R完全陌生.

我尝试安装 httr 软件包.

我先安装了pacman,然后尝试通过运行 pacman :: p_load(httr)通过它加载httr.

I first installed pacman, and then tried to load httr through it by running pacman::p_load(httr).

没有成功.并且它在终端中显示以下消息-

It wasn't successful. And it showed the following message in terminal-

将软件包安装到‘/home/|用户名|/R/x86_64-pc-linux-gnu-library/3.6"(因为"lib"是未指定),还安装了依赖项"curl","openssl"

Installing package into ‘/home/|username|/R/x86_64-pc-linux-gnu-library/3.6’ (as ‘lib’ is unspecified) also installing the dependencies ‘curl’, ‘openssl’

尝试URL' https://cloud.r-project.org/src/contrib/curl_4.3.tar.gz '内容类型应用程序/x-gzip"长度673779字节(657 KB)==================================================下载657 KB

trying URL 'https://cloud.r-project.org/src/contrib/curl_4.3.tar.gz' Content type 'application/x-gzip' length 673779 bytes (657 KB) ================================================== downloaded 657 KB

尝试网址' https://cloud.r-project.org/src/contrib/openssl_1.4.1.tar.gz 的内容类型'application/x-gzip'长度1206885字节(1.2 MB)==================================================下载1.2 MB

trying URL 'https://cloud.r-project.org/src/contrib/openssl_1.4.1.tar.gz' Content type 'application/x-gzip' length 1206885 bytes (1.2 MB) ================================================== downloaded 1.2 MB

尝试URL' https://cloud.r-project.org/src/contrib/httr_1.4.1.tar.gz '内容类型应用程序/x-gzip"长度158465字节(154 KB)==================================================下载154 KB

trying URL 'https://cloud.r-project.org/src/contrib/httr_1.4.1.tar.gz' Content type 'application/x-gzip' length 158465 bytes (154 KB) ================================================== downloaded 154 KB

  • 安装 source 软件包"curl" ...**包"curl"已成功解包,并检查了MD5的总和**使用分阶段安装在pkg-config搜索路径中找不到libcurl软件包.也许您应该添加目录包含 libcurl.pc'到PKG_CONFIG_PATH环境变量找到包"libcurl",但未在其中找到包libcurlpkg-config搜索路径.也许您应该添加目录包含 libcurl.pc"到PKG_CONFIG_PATH环境变量使用 PKG_CFLAGS= Using PKG_LIBS=-lcurl 找到包libcurl"------------------------- ANTICONF错误---------------------------配置失败,因为找不到libcurl.尝试安装:*deb:libcurl4-openssl-dev(Debian,Ubuntu等)* rpm:libcurl-devel(Fedora,CentOS,RHEL)* csw:libcurl_dev(Solaris)如果libcurl为已经安装,请检查PATH中是否有"pkg-config",PKG_CONFIG_PATH包含一个libcurl.pc文件.如果pkg-config是您无法通过以下方式手动设置INCLUDE_DIR和LIB_DIR:R CMD安装--configure-vars ='INCLUDE_DIR = ... LIB_DIR = ...'--------------------------------------------------------------------错误:软件包"curl"的配置失败
  • 删除"/home/|用户名|/R/x86_64-pc-linux-gnu-library/3.6/curl"
  • 安装 source 软件包"openssl" ...**软件包"openssl"已成功解压缩,并检查了MD5的总和**使用分阶段安装使用PKG_CFLAGS =------------------------- ANTICONF错误---------------------------配置失败,因为未找到openssl.尝试安装:*deb:libssl-dev(Debian,Ubuntu等)* rpm:openssl-devel(Fedora,CentOS,RHEL)* csw:libssl_dev(Solaris)* brew:openssl@1.1(MacOSX)如果已安装openssl,请检查是否已在其中安装了"pkg-config"您的PATH和PKG_CONFIG_PATH包含一个openssl.pc文件.如果pkg-config不可用,您可以手动设置INCLUDE_DIR和LIB_DIR通过:R CMD安装--configure-vars ='INCLUDE_DIR = ... LIB_DIR = ...'--------------------------------------------------------------------错误:软件包"openssl"的配置失败
  • 删除"/home/|用户名|/R/x86_64-pc-linux-gnu-library/3.6/openssl"错误:软件包不提供依赖项"curl","openssl"‘httr’
  • 删除"/home/|用户名|/R/x86_64-pc-linux-gnu-library/3.6/httr"
  • installing source package ‘curl’ ... ** package ‘curl’ successfully unpacked and MD5 sums checked ** using staged installation Package libcurl was not found in the pkg-config search path. Perhaps you should add the directory containing libcurl.pc' to the PKG_CONFIG_PATH environment variable No package 'libcurl' found Package libcurl was not found in the pkg-config search path. Perhaps you should add the directory containinglibcurl.pc' to the PKG_CONFIG_PATH environment variable No package 'libcurl' found Using PKG_CFLAGS= 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/|username|/R/x86_64-pc-linux-gnu-library/3.6/curl’
  • installing source package ‘openssl’ ... ** package ‘openssl’ successfully unpacked and MD5 sums checked ** using staged installation Using PKG_CFLAGS= ------------------------- 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=...' -------------------------------------------------------------------- ERROR: configuration failed for package ‘openssl’
  • removing ‘/home/|username|/R/x86_64-pc-linux-gnu-library/3.6/openssl’ ERROR: dependencies ‘curl’, ‘openssl’ are not available for package ‘httr’
  • removing ‘/home/|username|/R/x86_64-pc-linux-gnu-library/3.6/httr’

已下载的源程序包位于‘/tmp/Rtmp3wZaOu/downloaded_pa​​ckages’警告消息:1:在utils :: install.packages(package,...):安装软件包"curl"的退出状态为非零2:在utils :: install.packages(package,...) :安装包‘openssl’的退出状态为非零 3:在utils :: install.packages(package,...)中:安装软件包"httr"的退出状态为非零4:在p_install(package,character.only = TRUE,...):5:在库中(package,lib.loc =lib.loc,character.only = TRUE,逻辑.return = TRUE 、:没有名为"httr"的软件包6:在pacman :: p_load(httr)中:失败安装/加载:httr

The downloaded source packages are in ‘/tmp/Rtmp3wZaOu/downloaded_packages’ Warning messages: 1: In utils::install.packages(package, ...) : installation of package ‘curl’ had non-zero exit status 2: In utils::install.packages(package, ...) : installation of package ‘openssl’ had non-zero exit status 3: In utils::install.packages(package, ...) : installation of package ‘httr’ had non-zero exit status 4: In p_install(package, character.only = TRUE, ...) : 5: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, : there is no package called ‘httr’ 6: In pacman::p_load(httr) : Failed to install/load: httr

我该如何解决?

注意:我已经通过pacman安装了其他几个外部软件包.像dplyr,ggplot2等.

Note: I have installed several other external packages through pacman. Like- dplyr, ggplot2 etc.

推荐答案

httr 导入 openssl ( https://cran.r-project.org/web/packages/curl/index.html )两者都是特定的系统要求.对于 openssl "SystemRequirements:OpenSSL> = 1.0.1",对于 curl "SystemRequirements:libcurl:libcurl-devel(rpm)或libcurl4-openssl-dev(deb)."

httr imports openssl (https://cran.r-project.org/web/packages/openssl/index.html) and curl (https://cran.r-project.org/web/packages/curl/index.html) and both are specific system requirements. For openssl "SystemRequirements: OpenSSL >= 1.0.1" and for curl "SystemRequirements: libcurl: libcurl-devel (rpm) or libcurl4-openssl-dev (deb)."

这篇关于无法在Linux Mint 19.3的R 3.6.2中安装httr软件包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆