参考原文见

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. IDEA工具java开发之 常用插件 git插件 追加提交 Code Review==代码评审插件 撤销提交 撤销提交 关联远程仓库 设置git 本地操作

    ◆git 插件 请先安装git for windows ,git客户端工具 平时开发中,git的使用都是用可视化界面,git命令需要不时复习,以备不时之需 1.环境准备 (1)设置git (2)本地操 ...

  2. 「luogu1613」跑路

    传送门 Luogu 解题思路 对于所有可以用 \(2^k\) 形式表示的 \(dis(i,j)\),将\(i,j\)之间的 \(dis\) 置为 \(1\),可以用倍增 \(\text{Floyd}\ ...

  3. uniGUI之学习方法(18)

    官方例子D:\Program Files\FMSoft\Framework\uniGUI\Demos\Desktop 在Design里Main上右键,View as Form看到变化的属性. 看出变化 ...

  4. java也可以做出很漂亮的界面

    其实java想把界面做漂亮点的话,只要把背景做好就行了,在jdk1.6以后可以继承JFrame,或JWindow后如下设置即可 setUndecorated(true);//不要标题栏的修饰,主要防止 ...

  5. 你知道HTTP协议的ETag是干什么的吗?

    前言 在HTTP1.1规范中,新增了一个HTTP头信息:ETag.对于普通开发者来说,可能平时真的不会接触到该HTTP头.平时接触不到或者说用得少,不代表这个请求头不重要.ETag使用得当,是可以减少 ...

  6. C# Stream篇(三) -- TextWriter 和 StreamWriter

    TextWriter 和 StreamWriter 目录: 为何介绍TextWriter? TextWriter的构造,常用属性和方法 IFormatProvider的简单介绍 如何理解StreamW ...

  7. c++ char* 与LPCTSTR相互转化

    ] = "wo shi ni baba"; , , ch, -, NULL, ); wchar_t *wide = new wchar_t[num]; MultiByteToWid ...

  8. json序列化(重要)

    (1)同(2)public JsonResult JsonUserGet() { DataSet ds = Web_User.P_LG_User_Get(nUserId); return Json(J ...

  9. Gradient descend 梯度下降法和归一化、python中的实现(未完善)

    梯度下降法是优化函数参数最常用.简单的算法 通常就是将一组输入样本的特征$x^i$传入目标函数中,如$f(x) = wx + b$,再计算每个样本通过函数预测的值$f(x^i)$与其真实值(标签)$y ...

  10. Redis字符串类型

    字符串是Redis中最基本的数据类型,他能存储任何形式的字符串,包括二进制数据. 命令 赋值 SET key value > SET key hello OK 取值 GET key > G ...