Shadowsocks-libev: error while loading shared libraries: libmbedcrypto.so.0

Created on 9 Mar 2018  路  18Comments  路  Source: shadowsocks/shadowsocks-libev

Dear developer

I am using CentOS 7 x64:

$ uname -a
Linux localhost.localdomain 3.10.0-693.17.1.el7.x86_64 #1 SMP Thu Jan 25 20:13:58 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

I update the shadowsocks-libev to latest version shadowsocks-libev-3.1.3-1.el7.centos.x86_64 from yum

but when I try start ss-local, a error returns:

$ ss-local
ss-local: error while loading shared libraries: libmbedcrypto.so.0: cannot open shared object file: No such file or directory

It is very strange because I can normally use old version ss-local before updating. Could you please check if there is any bug in shadowsocks-libev-3.1.3-1.el7.centos.x86_64?

Many thanks

question

Most helpful comment

I have the same problem.
mbedtls 2.7.0-1.el7 has no libmbedcrypto.so.0
cd /usr/lib64

ls |grep mbed
libmbedcrypto.so.1
libmbedcrypto.so.2.7.0
libmbedtls.so.10
libmbedtls.so.2.7.0
libmbedx509.so.0
libmbedx509.so.2.7.0

link this.
ln -sf libmbedcrypto.so.1 libmbedcrypto.so.0
Temporary solution.

All 18 comments

yum install mbedtls-devel -y

@AnyoeDove

Package mbedtls-devel-2.7.0-1.el7.x86_64 already installed and latest version
Nothing to do

I have tried.

Try

echo "/usr/local/lib" > /etc/ld.so.conf.d/local.conf
ldconfig

@AnyoeDove

still couldn't work

emmmmmmmmmmmmm......
Try find /usr/ -name 'libmbedcrypto.so.0' and post your output here

@AnyoeDove

return nothing. It seems there is not such file in my system.

I have the same problem.
mbedtls 2.7.0-1.el7 has no libmbedcrypto.so.0
cd /usr/lib64

ls |grep mbed
libmbedcrypto.so.1
libmbedcrypto.so.2.7.0
libmbedtls.so.10
libmbedtls.so.2.7.0
libmbedx509.so.0
libmbedx509.so.2.7.0

link this.
ln -sf libmbedcrypto.so.1 libmbedcrypto.so.0
Temporary solution.

mbedtls-devel-2.7.0-1.el7.x86_64 dont have libmbedcrypto.so.0 actually... soft link some file might work

@whour @AnyoeDove
Creating soft link makes it work, thanks.

While soft link might work, you should know that this is unsafe and will probably lead to crashing due to ABI incompatibility.

The canonical approach is to consult with ss-libev binary's provider (definitely a third party provider since upstream did not provide such binary on CentOS 7) and ask them why they have built ss-libev against a different libmbedtls (different SONAME).

@hosiet

Thanks. but is ss-local in epel provided by @madeye (author)? Sorry I am a fresh man and I have no idea with it.

Taking a look at README.md, it is maintained externally by @librehat . You should read the instructions in README.md and report the problem in his repository.

it's not a bug.
since the rpm package you install from yum is compiled under mbedtls 2.6.0, while a week ago when you do yum update it will upgrade to mbedtls 2.7.0, different libs name.
so either you keep mbedtls 2.6.0 in your system or you manully compile shadowsocks-libev under mbedtls 2.7.0.

cd /usr/lib64/
cp libmbedcrypto.so.1 libmbedcrypto.so.0

or

ln -s /usr/lib/libmbedcrypto.so.1 /usr/lib/libmbedcrypto.so.0

Awesome. Note that under x86_64 system exec
ln -sf /usr/local/lib/libmbedcrypto.so.2.7.1 /usr/lib64/libmbedcrypto.so.0

yum install mbedtls
ln -sf /usr/lib64/libmbedcrypto.so.2.7.1 /usr/lib64/libmbedcrypto.so.0
OS: Centos 7.4

On Centos 7.5:
cd /usr/lib64/
cp libmbedcrypto.so.2 libmbedcrypto.so.1

Fedora:
ss-local: error while loading shared libraries: libmbedcrypto.so.2: cannot open shared object file: Error 40

Was this page helpful?
0 / 5 - 0 ratings