解决 Package test is missing dependencies for the following libraries: libcrypto.so.1.0.0

根据项目要求需要用到openssl这个库,看了看编译环境幸好本身就集成了该库。但在编译openssl的功能时,碰到缺少类库的错误。

      Package test is missing dependencies for the following libraries:  

        libcrypto.so.1.0.0

 看了看 编译器路径

     /home/sonny/Desktop/bitmain1/openwrt/staging_dir/target-mips_r2_uClibc-0.9.33.2/usr/lib

这个目录下是存在  libcrypto.so.1.0.0的。

百度谷歌查询了很多方法,为了保险我吧所有要修改的地方都列出来。若有类似问题应该能解决了

首先要在make memuconfig 时选上openssl有关的内容,应该还有其他的就不多说了。

 

 

下面开始添加库的操作。首先声明我使用Openwrt 没有几天,对其具体细节不甚了解。可能有说的不对的地方。

 

第一步:

确保/openwrt/staging_dir/target-mips_r2_uClibc-0.9.33.2/usr/lib目录下存在  libcrypto.so

其中staging_dir是我的配置的Openwrt的编译环境。

第二步:

在你写的代码文件夹下(我写的是个test)下的Makefile里

增加:DEPENDS:=+libcrypto 

就是在

define Package/test 
        SECTION:=utils  
        CATEGORY:=Utilities  
        TITLE:=test-- prints a snarky message  
        DEPENDS:=+libcrypto
endef

这个define下面。

 

第三步:也是在Makefile里增加:

define Package/test/install  
        $(INSTALL_DIR) $(1)/bin  
        $(CP) /lib/i386-linux-gnu/libc.so.6 $(1)/bin
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/helloworld $(1)/bin/  
endef

这里多了一行$(CP)的代码。

最后一步:

在openwrt/staging_dir/target-mips_r2_uClibc-0.9.33.2/pkginfo下的libcrypto.provides文件里增加两行:

/openwrt/staging_dir/target-mips_r2_uClibc-0.9.33.2/usr/lib
libcrypto.so.1.0.0  最后这一步对成败应该是很关键的。

 

 

posted @ 2014-11-15 13:55  怀英$$$  阅读(6436)  评论(0编辑  收藏  举报