在 64 位系统上运行 32 位程序时出现“No such file”

Mic*_*ael 6 64-bit bash files chromium executable

我下载了一个 Chromium 快照并将其解压缩,如下所示:

michael@ubuntu:/opt/chrome-linux$ ls
chrome                  libffmpegsumo.so                nacl_irt_x86_32.nexe
chrome.1                libppGoogleNaClPluginChrome.so  product_logo_48.png
chrome_100_percent.pak  locales                         resources
chrome.pak              nacl_helper                     resources.pak
chrome_sandbox          nacl_helper_bootstrap           xdg-mime
chrome-wrapper          nacl_irt_srpc_x86_32.nexe       xdg-settings
Run Code Online (Sandbox Code Playgroud)

但是当我尝试运行时chrome,它不存在......

michael@ubuntu:/opt/chrome-linux$ ./chrome
bash: ./chrome: No such file or directory
Run Code Online (Sandbox Code Playgroud)

有谁知道为什么打不开?运行 Xubuntu 12.10 AMD64。

michael@ubuntu:/opt/chrome-linux$ ldd /opt/chrome-linux/* | grep -i "not found"
ldd: /opt/chrome-linux/locales: not regular file
ldd: /opt/chrome-linux/resources: not regular file
Run Code Online (Sandbox Code Playgroud)

Gil*_*il' 6

您缺少 32 位支持。安装libc6:i386,即 32 位基础库包,以及 Chrome 需要的所有其他 32 位库(很可能接近Chromium 包的依赖项)。

当您无法执行依赖于“加载器”的文件时,您得到的错误可能是指加载器而不是您正在执行的文件。

  • 动态链接的本机可执行文件的加载器是系统中负责加载动态库的部分。它类似于/lib/ld.soor /lib/ld-linux.so.2,应该是一个可执行文件。
  • 脚本的加载器是在shebang行中提到的程序,例如/bin/sh对于以#!/bin/sh.

错误消息在没有表明加载程序是问题方面具有误导性。不幸的是,修复这个问题会很困难,因为内核接口只有报告数字错误代码的空间,而不能同时表明错误实际上涉及不同的文件。

一旦安装了包中的 32 位动态加载器/lib/ld-linux.so.2libc6:i386您至少会收到一条非误导性的错误消息,告诉您其他缺少的库。