首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何在Ubuntu上将pdftools安装到RStudio?

如何在Ubuntu上将pdftools安装到RStudio?
EN

Unix & Linux用户
提问于 2019-12-15 19:16:36
回答 1查看 1.7K关注 0票数 0

有人知道如何将pdftools安装到运行在Ubuntu18.04.3LTS上的RStudio 1.2.5019上吗?我试过:

代码语言:javascript
复制
> install.packages("pdftools")
Installing package into ‘/home/jaakko/R/x86_64-pc-linux-gnu-library/3.4’
(as ‘lib’ is unspecified)
also installing the dependencies ‘curl’, ‘qpdf’

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

trying URL 'https://cloud.r-project.org/src/contrib/qpdf_1.1.tar.gz'
Content type 'application/x-gzip' length 321408 bytes (313 KB)
==================================================
downloaded 313 KB

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

* installing *source* package ‘curl’ ...
** package ‘curl’ successfully unpacked and MD5 sums checked
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 containing `libcurl.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/jaakko/R/x86_64-pc-linux-gnu-library/3.4/curl’
Warning in install.packages :
  installation of package ‘curl’ had non-zero exit status
ERROR: dependency ‘curl’ is not available for package ‘qpdf’
* removing ‘/home/jaakko/R/x86_64-pc-linux-gnu-library/3.4/qpdf’
Warning in install.packages :
  installation of package ‘qpdf’ had non-zero exit status
ERROR: dependency ‘qpdf’ is not available for package ‘pdftools’
* removing ‘/home/jaakko/R/x86_64-pc-linux-gnu-library/3.4/pdftools’
Warning in install.packages :
  installation of package ‘pdftools’ had non-zero exit status

The downloaded source packages are in
    ‘/tmp/RtmpzEAfLC/downloaded_packages’
> library(pdftools)
Error in library(pdftools) : there is no package called ‘pdftools’
EN

回答 1

Unix & Linux用户

发布于 2019-12-15 19:50:10

仔细看一下错误消息。如果您想在Linux上使用R包,有时需要先安装依赖项。这里是libcurl4-openssl-dev。使用来自终端的以下命令安装此包。那么您应该能够从R中安装pdftools

代码语言:javascript
复制
sudo apt install libcurl4-openssl-dev
票数 1
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/557390

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档