我下载了一个可执行文件到我的 Ubuntu 10.04 上,但因为缺少库而无法运行。我还尝试使用 CMake 编译源代码。这是我的终端输出:
zack@zack-laptop:~/Desktop$ ./MultiMC
./MultiMC: error while loading shared libraries: libssl.so.1.0.0:
cannot open shared object file: No such file or directory
我认为我需要 libssl 1.0 来运行此文件,但我不确定。有什么帮助吗?
@Jim Salter:输出为lsb_release -d ; apt-file update ; apt-file search libssl.so.1.0.0
:
Description: Ubuntu 10.04.4 LTS
apt-file is now using the user's cache directory.
If you want to switch back to the system-wide cache directory,
run 'apt-file purge'
Downloading complete file http://us.archive.ubuntu.com/ubuntu/dists/lucid/Contents-i386.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 16.8M 100 16.8M 0 0 275k 0 0:01:02 0:01:02 --:--:-- 171k
Downloading complete file http://us.archive.ubuntu.com/ubuntu/dists/lucid-updates/Contents-i386.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 15.4M 100 15.4M 0 0 228k 0 0:01:09 0:01:09 --:--:-- 346k
Downloading Index http://us.archive.ubuntu.com/ubuntu/dists/lucid/Contents-i386.diff/Index:
No Index available.
Downloading complete file http://us.archive.ubuntu.com/ubuntu/dists/lucid/Contents-i386.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
File is up-to-date.
Downloading Index http://us.archive.ubuntu.com/ubuntu/dists/lucid-updates/Contents-i386.diff/Index:
No Index available.
Downloading complete file http://us.archive.ubuntu.com/ubuntu/dists/lucid-updates/Contents-i386.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 15.4M 0 0 0 0 0 0 --:--:-- 0:00:03 --:--:-- 0
File is up-to-date.
Downloading Index http://us.archive.ubuntu.com/ubuntu/dists/lucid/Contents-i386.diff/Index:
No Index available.
Downloading complete file http://us.archive.ubuntu.com/ubuntu/dists/lucid/Contents-i386.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
File is up-to-date.
Downloading Index http://us.archive.ubuntu.com/ubuntu/dists/lucid-updates/Contents-i386.diff/Index:
No Index available.
Downloading complete file http://us.archive.ubuntu.com/ubuntu/dists/lucid-updates/Contents-i386.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0
File is up-to-date.
Ignoring source without Contents File:
http://archive.canonical.com/ubuntu/dists/lucid/Contents-i386.gz
Downloading complete file http://security.ubuntu.com/ubuntu/dists/lucid-security/Contents-i386.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 12.2M 100 12.2M 0 0 303k 0 0:00:41 0:00:41 --:--:-- 367k
Downloading Index http://security.ubuntu.com/ubuntu/dists/lucid-security/Contents-i386.diff/Index:
No Index available.
Downloading complete file http://security.ubuntu.com/ubuntu/dists/lucid-security/Contents-i386.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 12.2M 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
File is up-to-date.
Downloading Index http://security.ubuntu.com/ubuntu/dists/lucid-security/Contents-i386.diff/Index:
No Index available.
Downloading complete file http://security.ubuntu.com/ubuntu/dists/lucid-security/Contents-i386.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 12.2M 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
File is up-to-date.
Ignoring source without Contents File:
http://dl.google.com/linux/chrome/deb/dists/stable/Contents-i386.gz
Ignoring source without Contents File:
http://ppa.launchpad.net/nilarimogard/webupd8/ubuntu/dists/lucid/Contents-i386.gz
答案1
you@box:~$ locate libssl.so.1.0.0
在我的计算机上,这将返回/lib/i386-linux-gnu/libssl.so.1.0.0
和/lib/x86_64-linux-gnu/libssl.so.1.0.0
。那么。您要运行的东西 - 它是 32 位代码还是 64 位代码?假设是前者:
you@box:~/Desktop$ mkdir ~/MultiMC
you@box:~/Desktop$ mv MultiMC ~/MultiMC
you@box:~/Desktop$ cd ~/MultiMC
you@box:~/MultiMC$ ln -s /lib/i386-linux-gnu/libssl.so.1.0.0 ./
you@box:~/MultiMC$ ./MultiMC
鲍勃应该是你的叔叔。(问题是你的“MultiMC”不知道在哪里寻找库,即使它实际上存在于你的系统中。理论上,如果你有权访问源代码 - 或者如果这只是一个脚本 - 你也可以编辑应用程序本身以在正确的位置查找库。)
如果你一开始就没有怎么办libssl.so.1.0.0
?好吧,在这种情况下你几乎肯定会有。但是也许在你满足这个条件后,它需要另一个库却找不到,而你却发现你还没有那个库……
you@box:~/MultiMC$ sudo apt-get install apt-file
you@box:~/MultiMC$ sudo apt-file update
you@box:~/MultiMC$ sudo apt-file search libssl.so.1.0.0
然后您可以安装包含您需要的库的任何包。 不过,请务必先检查您是否已经有该图书馆,只是不知道在哪里可以找到它!=)
答案2
是的,尝试在终端中运行它:
sudo apt-get install libssl1.0.0
如果你正在运行多架构,请尝试以下操作:
sudo apt-get install libssl1.0.0 libssl1.0.0:i386
看看是否有效:)