Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR for package ‘curl’ Linux Ubuntu #2091

Open
caduguimaraes opened this issue Jan 15, 2025 · 1 comment
Open

ERROR for package ‘curl’ Linux Ubuntu #2091

caduguimaraes opened this issue Jan 15, 2025 · 1 comment

Comments

@caduguimaraes
Copy link

Dear All.

I'm not able installing 'usethis' library at my Linux Ubuntu 24.04.1 LTS. The follow error is shown:

install.packages("usethis")
Installing package into/home/cadu_guimaraes/R/x86_64-pc-linux-gnu-library/4.3’
(aslibis unspecified)
also installing the dependenciescredentials’, ‘httr2’, ‘curl’, ‘gert’, ‘ghtrying URL 'https://cloud.r-project.org/src/contrib/credentials_2.0.2.tar.gz'
Content type 'application/x-gzip' length 283111 bytes (276 KB)
==================================================
  downloaded 276 KB

trying URL 'https://cloud.r-project.org/src/contrib/httr2_1.0.7.tar.gz'
Content type 'application/x-gzip' length 241007 bytes (235 KB)
==================================================
  downloaded 235 KB

trying URL 'https://cloud.r-project.org/src/contrib/curl_6.1.0.tar.gz'
Content type 'application/x-gzip' length 932957 bytes (911 KB)
==================================================
  downloaded 911 KB

trying URL 'https://cloud.r-project.org/src/contrib/gert_2.1.4.tar.gz'
Content type 'application/x-gzip' length 122659 bytes (119 KB)
==================================================
  downloaded 119 KB

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

trying URL 'https://cloud.r-project.org/src/contrib/usethis_3.1.0.tar.gz'
Content type 'application/x-gzip' length 384582 bytes (375 KB)
==================================================
  downloaded 375 KB

* installing *source* packagecurl...
** packagecurlsuccessfully 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
Package 'libcurl', required by 'virtual:world', not 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
Package 'libcurl', required by 'virtual:world', not found
Using PKG_CFLAGS=
  Using PKG_LIBS=-lcurl
--------------------------- [ANTICONF] --------------------------------
  Configuration failed because libcurl was not found. Try installing:
  * deb: libcurl4-openssl-dev (Debian, Ubuntu, etc)
* rpm: libcurl-devel (Fedora, CentOS, RHEL)
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 MESSAGE] ---------------------------
  <stdin>:1:10: fatal error: curl/curl.h: No such file or directory
compilation terminated.
--------------------------------------------------------------------
  ERROR: configuration failed for packagecurl* removing/home/cadu_guimaraes/R/x86_64-pc-linux-gnu-library/4.3/curlWarning in install.packages :
  installation of packagecurlhad non-zero exit status
ERROR: dependencycurlis not available for packagecredentials* removing/home/cadu_guimaraes/R/x86_64-pc-linux-gnu-library/4.3/credentialsWarning in install.packages :
  installation of packagecredentialshad non-zero exit status
ERROR: dependencycurlis not available for packagehttr2* removing/home/cadu_guimaraes/R/x86_64-pc-linux-gnu-library/4.3/httr2Warning in install.packages :
  installation of packagehttr2had non-zero exit status
ERROR: dependencycredentialsis not available for packagegert* removing/home/cadu_guimaraes/R/x86_64-pc-linux-gnu-library/4.3/gertWarning in install.packages :
  installation of packagegerthad non-zero exit status
ERROR: dependencyhttr2is not available for packagegh* removing/home/cadu_guimaraes/R/x86_64-pc-linux-gnu-library/4.3/ghWarning in install.packages :
  installation of packageghhad non-zero exit status
ERROR: dependenciescurl’, ‘gert’, ‘ghare not available for packageusethis* removing/home/cadu_guimaraes/R/x86_64-pc-linux-gnu-library/4.3/usethisWarning in install.packages :
  installation of packageusethishad non-zero exit status

The downloaded source packages are in/tmp/RtmpgERhkM/downloaded_packages#> Error in parse(text = input): <text>:2:12: unexpected symbol
#> 1: install.packages("usethis")
#> 2: Installing package
#> 

Is there a way to solve it?

Thanks in advance
CEG

@jennybc
Copy link
Member

jennybc commented Jan 15, 2025

Here's an excerpt from the above that should get you on the right track to resolving this:

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
Package 'libcurl', required by 'virtual:world', not 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
Package 'libcurl', required by 'virtual:world', not found
Using PKG_CFLAGS=
  Using PKG_LIBS=-lcurl
--------------------------- [ANTICONF] --------------------------------
  Configuration failed because libcurl was not found. Try installing:
  * deb: libcurl4-openssl-dev (Debian, Ubuntu, etc)
* rpm: libcurl-devel (Fedora, CentOS, RHEL)
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=...'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants