Ubuntu18.04可执行文件运行提示No such file or directory
参考原文见
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的更多相关文章
- 解决“运行arm-linux-gcc命令,提示No such file or directory”的问题
今天在ubuntu14.04上安装arm的交叉编译器arm-linux-gcc,环境变量配置好以后,运行arm-linux-gcc命令,总提示No such file or directory.然后去 ...
- Linux运行shell脚本提示No such file or directory错误的解决办法
Linux执行.sh文件,提示No such file or directory的问题: 原因:在windows中写好shell脚本测试正常,但是上传到 Linux 上以脚本方式运行命令时提示No s ...
- 64位Ubuntu14.04配置adb后提示No such file or directory
配置好SDK的环境变量后,输入adb提示 No such file or directory. 原因:由于是64位的linux系统,而Android SDK只有32位的,需要安装一些支持包才能使用 1 ...
- ITouch在xcode下提示‘No such file or directory, at ‘/SourceCache/DVTi...'
版权声明:本文为博主原创文章,转载或又一次发表请先与我联系. https://blog.csdn.net/jonahzheng/article/details/37692733 用一个台老 ...
- shell 执行提示No such file or directory
问题描述: 项目开发过程中ansible执行脚本失败,单独运行shell脚本提示:No such file or directory,脚本结构执行脚本a 调用另一脚本b, 但查看b脚本路径正确不存在找 ...
- linux执行python的脚本文件,提示提示No such file or directory
在window平台下,写好python脚本文件,迁移到linux平台,赋过可执行权限,执行该sh文件,却提示No such file or directory.ls 了下,确实有该文件,怎么会事呢, ...
- Linux执行.sh文件,提示No such file or directory的问题的解决方法
亲测有效:http://www.jb51.net/LINUXjishu/56395.html Linux执行.sh文件,提示No such file or directory的问题的解决方法 在win ...
- 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 ...
- Linux执行.sh文件,提示No such file or directory的问题
问题描述 在window平台下,写好shell脚本文件,迁移到linux平台,赋过可执行权限,执行该sh文件,却提示NO such file or directory 解决方案 难道是文件格式兼容性问 ...
随机推荐
- 记录一次Nginx使用第三方模块fair导致的线上故障排错
一.问题 今天发现有一台服务器的内存飙升,然后有预警,立即排查,发现该服务内存使用达到了 2G ,询问开发,当天是否有活动,被告知没有,登陆 Pinpoint 发现该服务是有两台机器,并且所有的访问都 ...
- 微信小程序 画布arc截取圆形图片
画布提供了一种可以创建圆的方法 arc(x, y, r, s, e, counterclockwise) x,y:圆心 r:圆的半径 s:起始弧度 (0) e:终止弧度 (1.5 * Math.PI) ...
- Python print()函数
#输出单个数据,会自动输出回车换行 print(1) print(2) #输出 1 2 #输出换行 print('\n') #防止换行 for x in range(0, 5): print(x, e ...
- 使用anaconda 3安装tensorflow 1.15.0 (win10环境)
0.写在前面 之前其实安装过一次tensorflow,但是由于电脑中毒,重装了系统,把所有的环境全部删除了.之前在博客里转发了一篇别人在win10安装tensorflow的教程,但是版本比较旧了, ...
- Linux进程通信方式
参考:https://www.cnblogs.com/yangykaifa/p/7295863.html
- 关于req.params、req.query、req.body等请求对象
请求对象,通常传递到回调方法,这意味着你可以随意命名,通常命名为 req 或 request . 请求对象中最常用的属性和方法有: req.params 一个数组,包含命名过的路由参数. req.pa ...
- Bootstrap入门(一)准备
Bootstrap入门(一)准备 网页的样式化与布局展示是很多开发者要面对的问题,目前有多的框架和工具包,可以使网页设计的任务变得更加简单.轻松.方便.快捷一些,其中,bootstra ...
- 搭建solr集群的时候出现 ./zkcli.sh:行13: unzip: 未找到命令
主要的原因是: linux系统下面没有安装压缩解压工具 zip 和 unzip:需要我们自己手动的安装: 利用yum命令安装即可: yum install -y unzip zip
- P1481 魔族密码(LIS变形)
题目描述(题目链接:https://www.luogu.org/problem/P1481) 风之子刚走进他的考场,就…… 花花:当当当当~~偶是魅力女皇——花花!!^^(华丽出场,礼炮,鲜花) 风之 ...
- 087、Java数组之对象数组的静态初始化
01.代码如下: package TIANPAN; class Book { private String title; private double price; public Book(Strin ...