libz.so.1: cannot open shared object file: No such file or directory

使用arm编译c程序时出现错误

[root@localhost Downloads]# arm-linux-gcc -o test test.c
/usr/local/arm/4.4.3/bin/../lib/gcc/arm-none-linux-gnueabi/4.4.3/../../../../arm-none-linux-gnueabi/bin/as: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory

解决:

[root@localhost Downloads]# yum install zlib.i686
已加载插件:fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirrors.btte.net
 * epel: mirror01.idc.hinet.net
 * extras: mirrors.btte.net
 * remi-safe: mirrors.tuna.tsinghua.edu.cn
 * updates: mirrors.btte.net
正在解决依赖关系
--> 正在检查事务
---> 软件包 zlib.i686.0.1.2.7-17.el7 将被 安装
--> 解决依赖关系完成

依赖关系解决

================================================================================
 Package         架构            版本                     源               大小
================================================================================
正在安装:
 zlib            i686            1.2.7-17.el7             base             91 k

事务概要
================================================================================
安装  1 软件包

总计:91 k
安装大小:180 k
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  正在安装    : zlib-1.2.7-17.el7.i686                                      1/1 
  验证中      : zlib-1.2.7-17.el7.i686                                      1/1 

已安装:
  zlib.i686 0:1.2.7-17.el7                                                      

完毕!
[root@localhost Downloads]# arm-linux-gcc -o test test.c
[root@localhost Downloads]# ls
arm-linux-gcc-4.4.3-20100728.tar.gz  opt  test  test.c
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值