Cmake libssh.so.4: version LIBSSH_4_8_1 not found

1.2k views Asked by At

I've been trying to build libyang on Ubuntu 22.04, and I keep running into this issue when running cmake:

cmake: usr/local/lib/libssh.so.4: version `LIBSSH_4_8_1' not found (required by /lib/x86_64-linux-gnu/libcurl.so.4)

I couldn't find anything on this anywhere. I have libssh-dev 0.9.6-2build1 installed and cmake version 3.22.1-1ubuntu1.

The error comes up when running cmake from anywhere, so I guess it's related to cmake itself?

Edit: For extra context, I've been trying to set up Netopeer2 using this guide: http://www.seguesoft.com/index.php/netconfc/free-trial-netconfc/2-uncategorised/1-setup-netopeer2

1

There are 1 answers

0
Shreyas Udaya On

So basically libssh is having conflicting versions in this case, I would recommend first doing ths command

ls /usr/local/lib/libssh*

This lists all the libssh versions you have. After which you should remove all the listed distributions, in this case being.

sudo rm /usr/local/lib/libssh.so.4

and so on. After this either do

sudo apt install libssh-dev

or also just directly clone using

git clone http://git.libssh.org/projects/libssh.git

and build from there. This is it. Hope it helps. Thank you. I also recommend to not use that link exactly. A better sequence for installing netopeer2, is to first install libyang, then libnetconf2 inside it, after which you install netopeer2. This provides a successful compilation. Sysrepo can be directly sudo installed.

Note: Worked in my case I don't know if it will work for yours.