“libstdc ++。so.6:无法打开共享对象文件:没有这样的文件或目录”
我根据这个问题中的信息与程序发生争执。 现在它已安装,但我无法弄清楚如何运行它。 运行相同版本的Ubuntu的朋友在以相同方式安装它之后启动它没有任何问题。
这就是我所做的:
$ ./Psychonauts ./Psychonauts: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
所以我继续前进:
$ sudo apt-get install libstdc++.so.6 Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package libstdc++.so.6 E: Couldn't find any package by regex 'libstdc++.so.6'
应该注意的是,我几天前才开始使用Linux。
好的,所以我设法安装了apt-file和apt-file update。
然而,我们遇到了另一个障碍。
usagiyojimbo@Usagi:~$ sudo apt-file find libstdc++.so.6 [sudo] password for usagiyojimbo: E: The cache is empty. You need to run 'apt-file update' first.
我做到了,当我这样做时说:
File is up-to-date. Ignoring source without Contents File: a link they won't let me post
要么
File is up-to-date. Downloading Index a link No Index available. Downloading complete file a link
当我尝试运行Psychonauts时,我仍然遇到同样的错误。
您收到错误消息:
E: Unable to locate package libstdc++.so.6 E: Couldn't find any package by regex 'libstdc++.so.6'
因为你试图安装一个无法安装的文件libstdc++.so.6
,因为它位于debian包中。
您可以使用apt-file
搜索包含该文件的包。 要安装它,请键入:
sudo apt-get install apt-file
然后你必须更新索引。
sudo apt-file update
之后,您可以搜索包含文件libstdc++.so.6
的包libstdc++.so.6
:
sudo apt-file find libstdc++.so.6
然后你会发现很多包含搜索文件的包。 在您的情况下,正确的包是libstdc++6
:
libstdc++6: /usr/lib/x86_64-linux-gnu/libstdc++.so.6
然后你可以安装所需的包:
sudo apt-get install libstdc++6
我认为Psychonauts是一个32位应用程序。 您需要安装:
apt-get install lib32stdc++6
你几乎就在那里,只是使用了比你需要的更多的字符:
sudo apt-get install libstdc++6
……应该做的伎俩。