LoginSignup
4
4

More than 5 years have passed since last update.

cmakeでCould NOT find Libcurl (missing: CURL_LIB CURL_INCLUDE_DIR)が出て詰まった話

Posted at

とあるオープンソースのプログラムのビルドにcmakeが必要だったので導入して

%cmake -DCMAKE_BUILD_TYPE=Release ..

と実行したところ
CMake Error at /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:148 (message):
Could NOT find Libcurl (missing: CURL_LIB CURL_INCLUDE_DIR)

こんなエラーを吐いた

libcurlが見つからないとのことだけど

%curl -V

で見てみると
curl 7.47.0 (x86_64-pc-linux-gnu) libcurl/7.47.0 GnuTLS/3.4.10 zlib/1.2.8 libidn/1.32 librtmp/2.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp smb smbs smtp smtps telnet tftp
Features: AsynchDNS IDN IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz TLS-SRP UnixSockets

ちゃんと入ってる

apt-get updateとかcurl入れなおしとか試したけどうまく行かず
調べたら海外のフォーラムでlibcurl4-openssl-devを入れたら動いたって話があった

%sudo apt-get install libcurl4-openssl-dev

提案パッケージ:
libcurl4-doc libcurl3-dbg libidn11-dev libkrb5-dev libldap2-dev librtmp-dev
以下のパッケージが新たにインストールされます:
libcurl4-openssl-dev

libcurl4-openssl-devがインストールされたらしい

これでcmakeでのビルドに成功した

4
4
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
4