参考原文见

https://blog.csdn.net/sun927/article/details/46593129?

最近我也遇到一个类似问题,同一个工具在Ubuntu16.04里面运行是好的,但是Ubuntu18.04运行就出错了。

我用file也看了是32bit的应用程序,但一直没想到Ubuntu18.04竟然默认去掉了32bit的library。

用uname命令打印系统信息,发现系统是64位系统

$ uname -a
Linux latitude-e5440 5.3.0-40-generic #32~18.04.1-Ubuntu SMP Mon Feb 3 14:05:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

安装ia32-libs,提示找不到了,候选lib32ncurses5或lib32z1,我用了lib32z1.

 sudo apt-get install ia32-libs
Building dependency tree
Reading state information... Done
Package ia32-libs is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
lib32ncurses5 lib32z1 E: Package 'ia32-libs' has no installation candidate
$ sudo apt-get install lib32z1

另外,如果用到32bit的libstdc++6,应该是安装

lib32stdc++6。

顺便看了一下查询用到的so,有两种办法

之一是ldd命令

ldd ./combine-image
linux-gate.so.1 (0xf7f63000)
libc.so.6 => /lib32/libc.so.6 (0xf7d71000)
/lib/ld-linux.so.2 (0xf7f64000)

之二是readelf -d

readelf -d  ./combine-image

Dynamic section at offset 0x7f20 contains 21 entries:
Tag Type Name/Value
0x00000001 (NEEDED) Shared library: [libc.so.6]
0x0000000c (INIT) 0x8048880

调用的是32bit的libc.so。

之前有部分应用不能运行估计也是这个原因。

不知道这个方法是不是可以适合WSL

Ubuntu18.04可执行文件运行提示No such file or directory的更多相关文章

  1. 解决“运行arm-linux-gcc命令,提示No such file or directory”的问题

    今天在ubuntu14.04上安装arm的交叉编译器arm-linux-gcc,环境变量配置好以后,运行arm-linux-gcc命令,总提示No such file or directory.然后去 ...

  2. Linux运行shell脚本提示No such file or directory错误的解决办法

    Linux执行.sh文件,提示No such file or directory的问题: 原因:在windows中写好shell脚本测试正常,但是上传到 Linux 上以脚本方式运行命令时提示No s ...

  3. 64位Ubuntu14.04配置adb后提示No such file or directory

    配置好SDK的环境变量后,输入adb提示 No such file or directory. 原因:由于是64位的linux系统,而Android SDK只有32位的,需要安装一些支持包才能使用 1 ...

  4. ITouch在xcode下提示‘No such file or directory, at ‘/SourceCache/DVTi...'

    版权声明:本文为博主原创文章,转载或又一次发表请先与我联系. https://blog.csdn.net/jonahzheng/article/details/37692733       用一个台老 ...

  5. shell 执行提示No such file or directory

    问题描述: 项目开发过程中ansible执行脚本失败,单独运行shell脚本提示:No such file or directory,脚本结构执行脚本a 调用另一脚本b, 但查看b脚本路径正确不存在找 ...

  6. linux执行python的脚本文件,提示提示No such file or directory

    在window平台下,写好python脚本文件,迁移到linux平台,赋过可执行权限,执行该sh文件,却提示No such file or directory.ls 了下,确实有该文件,怎么会事呢, ...

  7. Linux执行.sh文件,提示No such file or directory的问题的解决方法

    亲测有效:http://www.jb51.net/LINUXjishu/56395.html Linux执行.sh文件,提示No such file or directory的问题的解决方法 在win ...

  8. linux sh文件提示 no such file or directory

    Linux执行.sh文件,提示No such file or directory的问题的解决方法 12-06-28 16:59作者:love__coder Linux执行.sh文件,提示No such ...

  9. Linux执行.sh文件,提示No such file or directory的问题

    问题描述 在window平台下,写好shell脚本文件,迁移到linux平台,赋过可执行权限,执行该sh文件,却提示NO such file or directory 解决方案 难道是文件格式兼容性问 ...

随机推荐

  1. Linux 允许root用户远程登陆

    首先确保ssh服务已经安装: ps -e | grep ssh or service ssh start 如果没有安装则: apt-get install ssh 安装完之后 查看 /etc/ssh/ ...

  2. uniGUI之多页面框架(16)

    效果图: 左边的树 的树结点 ,通过 结点名 与 右 侧TabSheet名 一致时,显示 相关页面. 这是相关 源代码 procedure TMainForm.UniFormCreate(Sender ...

  3. C++11并发编程4------线程间共享数据

    举个例子: 刚参加工作的你,只能租房住,嫌房租贵就和别人合租了,两个人住一起只有一个洗手间,每天早上起床的时候,如果你室友在洗手间,你就只能等着,如果你强行进去,那画面就不可描述了.同样的问题,如果多 ...

  4. div背景图片自适应

    对背景图片设置属性:background-size:cover;可以实现背景图片适应div的大小. background-size有3个属性: auto:当使用该属性的时候,背景图片将保持100% 的 ...

  5. 窥探QQ基础数据库架构演变史

    作为腾讯最核心最基础的后台服务之一,QQ基础数据库是存储QQ用户帐户信息和关系链信息的海量集群,它承载了百万级每秒的访问量.十亿级的账户数.百亿级关系链.如此大规模的集群,它是如何从300万的数量级一 ...

  6. sqlserver 取数据常用

    sqlDataReader: public SqlDataReader GetAuth_CourtListByAuth(int autIntNo) { // Create Instance of Co ...

  7. C. Book Reading 求在[1,n]中的数中,能整除m的数 的个位的和

    C. Book Reading time limit per test 1 second memory limit per test 256 megabytes input standard inpu ...

  8. ADO.NET基础必背知识

    DO.NET 由.Net Framework 数据提供程序和DataSet 两部分构成. .NET FrameWork 是 Connection  连接对象 Command   命令对象 DataRe ...

  9. helm基本用法

    一.helm命令 helm search #关键字搜索charts helm pull #压缩下载chart到本地,可以使用--untar下载解压) helm install #部署chart到kub ...

  10. VMwara虚拟机三种网络模式

    虚拟机:虚拟机是能够让用户在一台物理机上模拟出多个操作系统的软件其本质是通过中间层实现计算机资源的管理和再分配让系统资源的利用率最大化VMware即是一款虚拟机软件注意:虚拟机和操作系统的区别,虚拟机 ...