# Error running cmake

**URL:** https://discourse.cmake.org/t/error-running-cmake/6709
**Category:** Usage
**Tags:** os:linux
**Created:** [October 21, 2022, 11:12pm UTC](https://discourse.cmake.org/t/error-running-cmake/6709 "2022-10-21T23:12:26Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Heiner\_Rodriguez](https://discourse.cmake.org/user_avatar/discourse.cmake.org/heiner_rodriguez/32/2850_2.png) [@Heiner\_Rodriguez](https://discourse.cmake.org/u/Heiner_Rodriguez)
#### Post date: [October 21, 2022, 11:12pm UTC](https://discourse.cmake.org/t/error-running-cmake/6709/1 "2022-10-21T23:12:26Z")

</div>

Hello, good afternoon.

I’m installing janus on a centos 7 server, I run the following commands:  
wget [https://cmake.org/files/v3.6/cmake-3.6.2.tar.gz](https://cmake.org/files/v3.6/cmake-3.6.2.tar.gz)  
tar -zxvf cmake-3.6.2.tar.gz  
cd cmake-3.6.2  
./bootstrap --prefix=/usr/local  
and it works fine, but when I run the “make” command I get the following error:

[3%] Built target cmsys  
[3%] Built target cmsysTestDynload  
[5%] Built target cmsys\_c  
[5%] Built target cmsysTestProcess  
[6%] Built target cmsysTestSharedForward  
[6%] Built target cmsysTestsC  
[8%] Built target cmsysTestsCxx  
[10%] Built target kwiml\_test  
[11%] Built target cmzlib  
[31%] Built target cmcurl  
[31%] Linking C executable LIBCURL  
lib/libcmcurl.a(openssl.c.o): In function `sk_X509_EXTENSION_num': openssl.c:(.text+0xa4): undefined reference to `OPENSSL\_sk\_num’  
lib/libcmcurl.a(openssl.c.o): In function `sk_X509_EXTENSION_value': openssl.c:(.text+0xc6): undefined reference to `OPENSSL\_sk\_value’  
lib/libcmcurl.a(openssl.c.o): In function `sk_X509_num': openssl.c:(.text+0xe0): undefined reference to `OPENSSL\_sk\_num’  
lib/libcmcurl.a(openssl.c.o): In function `sk_X509_value': openssl.c:(.text+0x102): undefined reference to `OPENSSL\_sk\_value’  
lib/libcmcurl.a(openssl.c.o): In function `sk_X509_pop': openssl.c:(.text+0x11c): undefined reference to `OPENSSL\_sk\_pop’  
lib/libcmcurl.a(openssl.c.o): In function `sk_X509_pop_free': openssl.c:(.text+0x141): undefined reference to `OPENSSL\_sk\_pop\_free’  
lib/libcmcurl.a(openssl.c.o): In function `sk_GENERAL_NAME_num': openssl.c:(.text+0x15b): undefined reference to `OPENSSL\_sk\_num’  
lib/libcmcurl.a(openssl.c.o): In function `sk_GENERAL_NAME_value': openssl.c:(.text+0x17d): undefined reference to `OPENSSL\_sk\_value’  
lib/libcmcurl.a(openssl.c.o): In function `Curl_ossl_init': openssl.c:(.text+0xf80): undefined reference to `OPENSSL\_init\_ssl’  
openssl.c:(.text+0xf8f): undefined reference to `OPENSSL_init_ssl' openssl.c:(.text+0xfa9): undefined reference to `OPENSSL\_init\_crypto’  
lib/libcmcurl.a(openssl.c.o): In function `ossl_connect_step1': openssl.c:(.text+0x2492): undefined reference to `TLS\_client\_method’  
openssl.c:(.text+0x26c5): undefined reference to `SSL_CTX_set_options' lib/libcmcurl.a(openssl.c.o): In function `get\_cert\_chain’:  
openssl.c:(.text+0x3636): undefined reference to `X509_get_version' openssl.c:(.text+0x3897): undefined reference to `X509\_get0\_extensions’  
openssl.c:(.text+0x38b7): undefined reference to `X509_getm_notBefore' openssl.c:(.text+0x393f): undefined reference to `X509\_getm\_notAfter’  
openssl.c:(.text+0x3a2c): undefined reference to `EVP_PKEY_get0_RSA' openssl.c:(.text+0x3a57): undefined reference to `RSA\_get0\_key’  
openssl.c:(.text+0x3a77): undefined reference to `RSA_get0_factors' openssl.c:(.text+0x3a9b): ​​undefined reference to `RSA\_get0\_crt\_params’  
openssl.c:(.text+0x3c72): undefined reference to `EVP_PKEY_get0_DSA' openssl.c:(.text+0x3c9d): undefined reference to `DSA\_get0\_pqg’  
openssl.c:(.text+0x3cbd): undefined reference to `DSA_get0_key' openssl.c:(.text+0x3d96): undefined reference to `EVP\_PKEY\_get0\_DH’  
openssl.c:(.text+0x3dc1): undefined reference to `DH_get0_pqg' openssl.c:(.text+0x3de1): undefined reference to `DH\_get0\_key’  
lib/libcmcurl.a(openssl.c.o): In function `pkp_pin_peer_pubkey': openssl.c:(.text+0x408b): undefined reference to `X509\_get\_X509\_PUBKEY’  
openssl.c:(.text+0x40de): undefined reference to `X509_get_X509_PUBKEY' lib/libcmcurl.a(openssl.c.o): In function `servercert’:  
openssl.c:(.text+0x4291): undefined reference to `X509_getm_notBefore' openssl.c:(.text+0x4310): undefined reference to `X509\_getm\_notAfter’  
lib/libcmcurl.a(openssl.c.o): In function `Curl_ossl_version': openssl.c:(.text+0x50ff): undefined reference to `OpenSSL\_version\_num’  
collect2: error: ld returned 1 exit status  
make[2]: \*\*\* [Utilities/cmcurl/LIBCURL] Error 1  
make[1]: \*\*\* [Utilities/cmcurl/CMakeFiles/LIBCURL.dir/all] Error 2  
make: \*\*\* [all] Error 2

Can you help me with this error, thanks

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [October 25, 2022, 3:58pm UTC](https://discourse.cmake.org/t/error-running-cmake/6709/2 "2022-10-25T15:58:34Z")

</div>

It looks like the OpenSSL headers found do not match the library that gets found. What OpenSSL-related cache variables and values are in your build’s `CMakeCache.txt`?

---

<div class="post-metadata">

### Author: ![jwm](https://discourse.cmake.org/user_avatar/discourse.cmake.org/jwm/32/654_2.png) [@jwm](https://discourse.cmake.org/u/jwm)
#### Post date: [October 25, 2022, 4:18pm UTC](https://discourse.cmake.org/t/error-running-cmake/6709/3 "2022-10-25T16:18:13Z")

</div>

See [CentOS7 and OpenSSL 1.1 - #5 by jwm](https://discourse.cmake.org/t/centos7-and-openssl-1-1/6229/5). If you have **openssl11** installed, CMake won’t pick it up, by default.
