CURL(欠落:CURL_LIBRARY CURL_INCLUDE_DIR)とCMAKE_C_COMPILER_RANLIBが見つかりません:FILEPATH = / usr / bin / gcc-ranlib

CURL(欠落:CURL_LIBRARY CURL_INCLUDE_DIR)とCMAKE_C_COMPILER_RANLIBが見つかりません:FILEPATH = / usr / bin / gcc-ranlib

フォローする取付要素

最新バージョンの3.9.6 tar.gzパッケージをダウンロードしました。

ここに画像の説明を入力してください。

ただし、次のエラーが発生します。

[root@localhost release]# cmake ..
-- Could NOT find CURL (missing: CURL_LIBRARY CURL_INCLUDE_DIR)
CMake Error at CMakeLists.txt:69 (find_package):
  By not providing "FindLeatherman.cmake" in CMAKE_MODULE_PATH this project
  has asked CMake to find a package configuration file provided by
  "Leatherman", but CMake did not find one.

  Could not find a package configuration file provided by "Leatherman" with
  any of the following names:

    LeathermanConfig.cmake
    leatherman-config.cmake

  Add the installation prefix of "Leatherman" to CMAKE_PREFIX_PATH or set
  "Leatherman_DIR" to a directory containing one of the above files.  If
  "Leatherman" provides a separate development package or SDK, be sure it has
  been installed.


-- Configuring incomplete, errors occurred!
See also "/tools/puppet/facter-3.9.6/release/CMakeFiles/CMakeOutput.log".
[root@localhost release]#

CMakeLists.txt:69:

CMAKE_C_COMPILER_RANLIB:FILEPATH=/usr/bin/gcc-ranlib

CentOS 7.2サーバーにカールがあります。


[root@localhost release]# curl --version
curl 7.29.0 (x86_64-redhat-linux-gnu) libcurl/7.29.0 NSS/3.36 zlib/1.2.7 libidn/1.28 libssh2/1.4.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp scp sftp smtp smtps telnet tftp
Features: AsynchDNS GSS-Negotiate IDN IPv6 Largefile NTLM NTLM_WB SSL libz unix-sockets

インストールしようとしましたが、libcurl4-openssl-devパッケージはありません。

yum  install libcurl4-openssl-dev -y
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
No package libcurl4-openssl-dev available.
Error: Nothing to do

ベストアンサー1

Centosは異なるパッケージ名を使用します。 Debian/Ubuntu パッケージ名は ですlibcurl4-openssl-dev。ただし、libcurl-develCentOSでは同じファイルとより多くのファイルを使用できます。この試み:

sudo yum install libcurl-devel 

また、次の例に示すように、利用可能なパッケージを検索できます。

yum search libcurl

YUMコマンドチートシート

おすすめ記事