R install,"curl" on CentOS 7.6

> BiocManager::install("curl")

Bioconductor version 3.10 (BiocManager 1.30.10), R 3.6.0 (2019-04-26)

Installing package(s) 'curl'

trying URL 'https://cran.rstudio.com/src/contrib/curl_4.3.tar.gz'

Content type 'application/x-gzip' length 673779 bytes (657 KB)

==================================================

downloaded 657 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 ‘/usr/lib64/R/library/curl’

The downloaded source packages are in

‘/tmp/Rtmp75yk3O/downloaded_packages’

Updating HTML index of packages in '.Library'

Making 'packages.html' ... done

Warning message:

In install.packages(...) :

installation of package ‘curl’ had non-zero exit status

解决方法:

yum install libcurl-devel

yum install openssl

yum install openssl-devel

yum install libxml2

yum install libxml2-devel

  • 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)