R:安装程序包语言服务器具有非零退出状态 [英] R: install packages languageserver had non-zero exit status

查看:78
本文介绍了R:安装程序包语言服务器具有非零退出状态的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

简介

操作系统:Ubuntu 20.04.3 LTS

我当前正在R上安装语言服务器程序包,以使用R VS代码扩展。

有问题

但当我使用Ubuntu的终端在R中执行install.packages("languageserver")时,我出现以下错误:

> install.packages("languageserver")
Installing package into ‘/home/mathieu-s/R/x86_64-pc-linux-gnu-library/4.1’
(as ‘lib’ is unspecified)
also installing the dependencies ‘curl’, ‘httr’, ‘lintr’

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

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

trying URL 'https://cloud.r-project.org/src/contrib/lintr_2.0.1.tar.gz'
Content type 'application/x-gzip' length 219142 bytes (214 KB)
==================================================
downloaded 214 KB

trying URL 'https://cloud.r-project.org/src/contrib/languageserver_0.3.12.tar.gz'
Content type 'application/x-gzip' length 78124 bytes (76 KB)
==================================================
downloaded 76 KB

* 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 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/mathieu-s/R/x86_64-pc-linux-gnu-library/4.1/curl’
ERROR: dependency ‘curl’ is not available for package ‘httr’
* removing ‘/home/mathieu-s/R/x86_64-pc-linux-gnu-library/4.1/httr’
ERROR: dependency ‘httr’ is not available for package ‘lintr’
* removing ‘/home/mathieu-s/R/x86_64-pc-linux-gnu-library/4.1/lintr’
ERROR: dependency ‘lintr’ is not available for package ‘languageserver’
* removing ‘/home/mathieu-s/R/x86_64-pc-linux-gnu-library/4.1/languageserver’

The downloaded source packages are in
    ‘/tmp/RtmpVaqLTX/downloaded_packages’
Warning messages:
1: In install.packages("languageserver") :
  installation of package ‘curl’ had non-zero exit status
2: In install.packages("languageserver") :
  installation of package ‘httr’ had non-zero exit status
3: In install.packages("languageserver") :
  installation of package ‘lintr’ had non-zero exit status
4: In install.packages("languageserver") :
  installation of package ‘languageserver’ had non-zero exit status

但我不知道如何解决此错误,有人能帮我解决此问题吗?

推荐答案

您应该在Ubuntu中安装libcurl4-openssl-dev,在Ubuntu中尝试以下代码terminal

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

然后重试在R中安装languageserver

这篇关于R:安装程序包语言服务器具有非零退出状态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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