我想启动wine
可执行文件(版本2.12),但是出现以下错误($
= shell提示符):
$ wine
bash: /usr/bin/wine: No such file or directory
$ /usr/bin/wine
bash: /usr/bin/wine: No such file or directory
$ cd /usr/bin
$ ./wine
bash: ./wine: No such file or directory
但是,文件在那里:
$ which wine
/usr/bin/wine
可执行文件肯定在那里,并且没有死的符号链接:
$ stat /usr/bin/wine
File: /usr/bin/wine
Size: 9712 Blocks: 24 IO Block: 4096 regular file
Device: 802h/2050d Inode: 415789 Links: 1
Access: (0755/-rwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2017-07-13 13:53:00.000000000 +0200
Modify: 2017-07-08 03:42:45.000000000 +0200
Change: 2017-07-13 13:53:00.817346043 +0200
Birth: -
它是32位ELF:
$ file /usr/bin/wine
/usr/bin/wine: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV),
dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 2.6.32,
BuildID[sha1]=eaf6de433d8196e746c95d352e0258fe2b65ae24, stripped
我可以得到可执行文件的动态部分:
$ readelf -d /usr/bin/wine
Dynamic section at offset 0x1efc contains 27 entries:
Tag Type Name/Value
0x00000001 (NEEDED) Shared library: [libwine.so.1]
0x00000001 (NEEDED) Shared library: [libpthread.so.0]
0x00000001 (NEEDED) Shared library: [libc.so.6]
0x0000001d (RUNPATH) Library runpath: [$ORIGIN/../lib32]
0x0000000c (INIT) 0x7c000854
0x0000000d (FINI) 0x7c000e54
[more addresses without file names]
但是,我无法使用列出共享对象的依赖关系ldd
:
$ ldd /usr/bin/wine
/usr/bin/ldd: line 117: /usr/bin/wine: No such file or directory
strace
显示:
execve("/usr/bin/wine", ["wine"], 0x7fff20dc8730 /* 66 vars */) = -1 ENOENT (No such file or directory)
fstat(2, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 4), ...}) = 0
write(2, "strace: exec: No such file or di"..., 40strace: exec: No such file or directory
) = 40
getpid() = 23783
exit_group(1) = ?
+++ exited with 1 +++
通过@jww进行编辑以添加建议:由于未ld
生成调试消息,因此在请求动态链接的库之前似乎发生了此问题:
$ LD_DEBUG=all wine
bash: /usr/bin/wine: No such file or directory
即使仅打印的可能值LD_DEBUG
,也会出现错误
$ LD_DEBUG=help wine
bash: /usr/bin/wine: No such file or directory
编辑以添加@Raman Sailopal的建议:问题似乎出在可执行文件内,因为将内容复制/usr/bin/wine
到另一个已创建的文件时会产生相同的错误
root:bin # cp cat testcmd
root:bin # testcmd --help
Usage: testcmd [OPTION]... [FILE]...
Concatenate FILE(s) to standard output.
[rest of cat help page]
root:bin # dd if=wine of=testcmd
18+1 records in
18+1 records out
9712 bytes (9.7 kB, 9.5 KiB) copied, 0.000404061 s, 24.0 MB/s
root:bin # testcmd
bash: /usr/bin/testcmd: No such file or directory
有什么问题,或者我该怎么办才能找出缺少的文件或目录?
uname -a
:
Linux laptop 4.11.3-1-ARCH #1 SMP PREEMPT Sun May 28 10:40:17 CEST 2017 x86_64 GNU/Linux
/etc/pacman.conf
。wine
软件包的所有依赖项均已安装。但是,重新安装它们只是为了确保...
/lib/ld-linux.so.2
你的系统?所有症状都表明它丢失了,只需检查一下即可。
/lib
丢失了:-)
file
命令显示了为此可执行文件设置的解释器。