error while loading shared libraries: libva.so.1: cannot open shared object file: No such file or di

在做某项目的时候遇到这个问题,

error while loading shared libraries: libva.so.1: cannot open shared object file: No such file or directory

然后问bing ai说要从github下载源码然后配置编译安装,太麻烦了,但是其实自己电脑中是有这个库的,只不过软连接的名字不一样,解决方法如下

ldconfig -p | grep libva.so.2
	libva.so.2 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libva.so.2

然后 

ll /usr/lib/x86_64-linux-gnu/libva.so.2
lrwxrwxrwx 1 root root 16 4月   3  2018 /usr/lib/x86_64-linux-gnu/libva.so.2 -> libva.so.2.100.0

这里可以看到自己电脑中是把 libva.so.2.100.0链接为libva.so.2,所以,那我再软连接个libva.so.1就行了,

sudo ln -s /usr/lib/x86_64-linux-gnu/libva.so.2.100.0 /lib/x86_64-linux-gnu/libva.so.1

问题解决。

参考文献:https://github.com/stepmania/stepmania/issues/2186