【Ubuntu 64bit】libz.so.1: cannot open shared object file: No such file or directory 【Android NDK】
来源:互联网 发布:php 私有变量 编辑:程序博客网 时间:2024/05/14 15:04
原文:http://blog.csdn.net/jhg19900321/article/details/7375924
今天由于项目需要,需要在Ubuntu环境下配置NDK,一开始以为蛮简单的,没想到还是遇到了一些问题,在这里和大家一起分享下,也希望以后遇到相同问题的朋友可以少绕弯子。 首先到 下下载NDK文件
解压缩到home文件下,例如:
/home/jhg/android/android-ndk-r6b/
添加路径
打开路径文件
sudo gedit ~/.bashrc
添加路径
NDK=/home/jhg/android/android-ndk-r6b/
export=$NDK
保存
注意:我已开始用找到该文件直接用gedit打开,修改后无法保存,发现权限不够,就算取得root权限还是无法保存,最后用sudo gedit ~/.bashrc 才解决问题。
编译NDK自带samples里的工程
进入工程目录
/home/jhg/android/android-ndk-r6b/samples/hello-jni
输入命令
$NDK/ndk-build
可以在工程文件下面看到多出了libs和obj文件,将其导入eclipse工程即可。
注意:在配置的时候我还遇到了一个问题,可能和电脑是32位的有关,自己的出错信息已经找不到了,找了个别的错误代码,如下
doug@shadowmint:~/libpng-android$ ~/android-ndk/ndk-build
NDK_PROJECT_PATH=./ Compile thumb : png <= png.c /home/doug/android-ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/as: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory make: *** [obj/local/armeabi/objs/png/png.o] Error 1
NDK_PROJECT_PATH=./ Compile thumb : png <= png.c /home/doug/android-ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/as: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory make: *** [obj/local/armeabi/objs/png/png.o] Error 1
这时候输入命令:
sudo apt-get install lib32z1
0
上一篇:linux下android开发环境搭建及NDK安装[集成gcc编译器]
下一篇:ubuntu修改root密码
相关热门文章
- SHTML是什么_SSI有什么用...
- shell中字符串操作
- 卡尔曼滤波的原理说明...
- 关于java中的“错误:找不到或...
- shell中的特殊字符
- linux dhcp peizhi roc
- 关于Unix文件的软链接
- 求教这个命令什么意思,我是新...
- sed -e "/grep/d" 是什么意思...
- 谁能够帮我解决LINUX 2.6 10...
给主人留下些什么吧!~~
评论热议
0 0
- 【Ubuntu 64bit】libz.so.1: cannot open shared object file: No such file or directory 【Android NDK】
- 【Ubuntu 64bit】libz.so.1: cannot open shared object file: No such file or directory
- error libz.so.1: cannot open shared object file:No such file or directory
- libz.so.1: cannot open shared object file: No such file or directory
- eclipse创建android项目出现error libz.so.1: cannot open shared object file:No such file or directory
- eclipse创建android项目出现error libz.so.1: cannot open shared object file:No such file or directory
- Ubuntu 下 libmpfr.so.1: cannot open shared object file: No such file or directory 问题
- error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or di
- error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or di
- error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or dir
- as: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or
- error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or dir
- error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or dir
- error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or dir
- samba libtalloc.so.1 : cannot open shared object file: no such file or directory
- ImportError: libghmm.so.1: cannot open shared object file: No such file or directory 解决方案
- libcxcore.so.1: cannot open shared object file: No such file or directory
- shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
- [Android NDK]修复/lib/ld-linux.so.2: bad ELF interpreter: No such file or directory 问题
- 64位linux安装Android NDK SDK的问题
- linux的Eclipse菜单没有图标解决方法
- linux下android开发环境搭建及NDK安装[集成gcc编译器]
- fedora 安装smplayer 播放各种格式视频
- 【Ubuntu 64bit】libz.so.1: cannot open shared object file: No such file or directory 【Android NDK】
- ubuntu修改root密码
- 为Ubuntu Server安装gnome图形桌面环境
- CSDN公司-数据平台架构草案
- 交叉编译 google protobuf
- 最大子序列、最长递增子序列、最长公共子串、最长公共子序列、
- [android NDK]问题与错误总结
- android编译系统的makefile文件Android.mk写法如下
- Github 简明教程
原创粉丝点击
热门IT博客
热门问题
老师的惩罚
人脸识别
我在镇武司摸鱼那些年
重生之率土为王
我在大康的咸鱼生活
盘龙之生命进化
天生仙种
凡人之先天五行
春回大明朝
姑娘不必设防,我是瞎子
明行足洗脑后怎么办
乐呼代充被骗了怎么办
河南农信微信提现怎么办
电视首页打不开怎么办
手酸痛睡不着怎么办
富氢水机不出水怎么办
云联惠联盟商家怎么办
伊思多尔倒了会怎么办
云联惠受害者怎么办
电信销号余额怎么办
信用卡乱扣钱怎么办
手机欠费被拉黑怎么办
畅语充值被骗了怎么办
WPS 打不开怎么办
短信健打不开怎么办
软件进不去怎么办
明斯基时刻发生怎么办
网上被骂怎么办
浮力森林怎么办会员卡
iphone屏幕黄斑怎么办
刘海要长不短的怎么办
被易考网骗了怎么办
淘鲜达送死虾怎么办
卡卡贷没有额度怎么办
股票触及平仓线怎么办
学校官网登不上怎么办
易到钱没用完怎么办
苏宁云钻上限怎么办
公司换地址怎么办
流量不足怎么办
足球决赛平局怎么办
新房到期未交房怎么办
骑手送货慢怎么办
云联惠会员怎么办
云联惠注册账号怎么办
云联惠被骗怎么办
云联惠被骗了怎么办
投资云联惠被骗怎么办
被云联惠骗的钱怎么办
商家漏发货怎么办
唯品会买到假的怎么办