eclipse /lib/x86_64-linux-gnu/libz.so.1:未找到版本“ZLIB_1.2.9”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/48306849/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
/lib/x86_64-linux-gnu/libz.so.1: version `ZLIB_1.2.9' not found
提问by Mel3
I'm new to linux and using Eclipse Oxygen.2 Release 4.7.2 on Ubuntu 16.04
我是 Linux 新手,在 Ubuntu 16.04 上使用 Eclipse Oxygen.2 Release 4.7.2
I'm getting the error:
我收到错误:
/usr/lib/opencv-2.4.13.5/build/lib/libopencv_java2413.so: /lib/x86_64-linux-gnu/libz.so.1: version `ZLIB_1.2.9' not found (required by /home/mel3/anaconda/lib/libpng16.so.16)
/usr/lib/opencv-2.4.13.5/build/lib/libopencv_java2413.so:/lib/x86_64-linux-gnu/libz.so.1:未找到版本“ZLIB_1.2.9”(/home/mel3/需要)蟒蛇/lib/libpng16.so.16)
I've tried upgrading and reloading and not sure if there is a path error or what going on. Help much appreciated
我试过升级和重新加载,但不确定是否存在路径错误或发生了什么。非常感谢帮助
回答by Alex Kaszynski
The accepted answer didn't work for me, but following here did:
接受的答案对我不起作用,但遵循这里:
https://ubuntuforums.org/showthread.php?t=2375927
https://ubuntuforums.org/showthread.php?t=2375927
Repeating the answer:
重复回答:
cd /your_software/../lib/ (the directory containing libz.so.1)
mv libz.so.1 libz.so.1.old
ln -s /lib/x86_64-linux-gnu/libz.so.1
回答by Kamrul hassan
回答by Casey L
The accepted answer did not work for me either, and I really suggest being careful when symlinking over a widely used binarylike /lib/x86_64-linux-gnu/libz.so.1
.
接受的答案对我也不起作用,我真的建议在对广泛使用的二进制文件(如/lib/x86_64-linux-gnu/libz.so.1
.
The make uninstall
for zlib-1.2.9
will destroy this symlink, which will break a ton of packages and be a huge pain to fix.
在make uninstall
对zlib-1.2.9
会破坏这个符号链接,这将打破一吨的包,是一个巨大的痛苦来修复。
Alex's solution worked for me and is much less destructive, since you're only modifying the symlink in the directory of your executable, not the whole system.
Alex 的解决方案对我有用并且破坏性要小得多,因为您只修改可执行文件目录中的符号链接,而不是整个系统。
回答by goks
A safe option instead of messing up the system libraries is to download (or build) libz.so.1.2.9 and place it in the directory of your executable (or wherever) and export LD_LIBRARY_PATHto that directory
一个安全的选择而不是搞乱系统库是下载(或构建)libz.so.1.2.9 并将其放在可执行文件的目录中(或任何地方)并将LD_LIBRARY_PATH 导出到该目录
e.g.
例如
cd /<DIRECTORY OF YOUR EXECUTABLE NEEDING ZLIB__1.2.9>/
export LD_LIBRARY_PATH=$PWD
Now your executable will load the zlib from new location instead of /lib/x86_64-linux-gnu
现在您的可执行文件将从新位置加载 zlib 而不是 /lib/x86_64-linux-gnu
check with
检查
ldd <executable>
zlib should be referenced from new LD_LIBRARY_PATH
zlib 应该从新的 LD_LIBRARY_PATH 引用
回答by Benjamin
if the solution of Kamrul hassan broke your pc don't panic and do :
如果 Kamrul hassan 的解决方案损坏了您的电脑,请不要惊慌并执行以下操作:
sudo ldconfig
to restore to the previous state.
以恢复到以前的状态。