openwrt 编译软件包出现错误(is missing dependencies for the following libraries: libpthread.so.0)

install -m0755 /home/yanfa/workspace/trunk-wr703/build_dir/target-mips_r2_uClibc-0.9.33.2/lk_cnp_serial_eth/lk_cnp_serial_eth /home/yanfa/workspace/trunk-wr703/build_dir/target-mips_r2_uClibc-0.9.33.2/lk_cnp_serial_eth/ipkg-ar71xx/lk_cnp_serial_eth/bin/
find /home/yanfa/workspace/trunk-wr703/build_dir/target-mips_r2_uClibc-0.9.33.2/lk_cnp_serial_eth/ipkg-ar71xx/lk_cnp_serial_eth -name 'CVS' -o -name '.svn' -o -name '.#*' -o -name '*~'| xargs -r rm -rf
Package lk_cnp_serial_eth is missing dependencies for the following libraries:
libpthread.so.0
make[3]: *** [/home/yanfa/workspace/trunk-wr703/bin/ar71xx/packages/lk_cnp_serial_eth_1_ar71xx.ipk] Error 1
make[3]: Leaving directory `/home/yanfa/workspace/trunk-wr703/package/lk_cnp_serial_eth'
make[2]: *** [package/lk_cnp_serial_eth/compile] Error 2
make[2]: Leaving directory `/home/yanfa/workspace/trunk-wr703'
make[1]: *** [/home/yanfa/workspace/trunk-wr703/staging_dir/target-mips_r2_uClibc-0.9.33.2/stamp/.package_compile] Error 2
make[1]: Leaving directory `/home/yanfa/workspace/trunk-wr703'
make: *** [world] Error 2
yanfa@ubuntu:~/workspace/trunk-wr703$ 

 

 

加上这句话还是不行DEPENDS:=+libpthread

image

发现编译还是:

Package lk_cnp_serial_eth is missing dependencies for the following libraries:
libpthread.so.0

于是在make menuconfig中选上

image

结果编译OK

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
1. 下载SDK 首先需要从OpenWrt官网下载SDK。选择与路由器硬件平台对应的SDK,例如:如果你的路由器是MT7620A芯片,则需要下载MT7620A SDK。 2. 解压SDK 将下载的SDK解压到任意目录下,例如:/opt/mt7620a_sdk。 3. 进入SDK目录 打开终端,进入SDK目录,例如:cd /opt/mt7620a_sdk。 4. 配置SDK 执行make menuconfig命令,进入SDK配置界面,进行以下配置: - Target System: 选择路由器的芯片类型,例如:MediaTek Ralink MIPS - Target Profile: 选择路由器的型号,例如:MT7620A based boards - Target Images: 选择编译软件包的目标平台,例如:ramips/mt7620a 5. 添加软件包源 执行以下命令,添加软件包源: echo "src/gz openwrt_custom http://openwrt.inkworm.com/chaos_calmer/15.05/mt7620a/packages/custom" >> /etc/opkg/customfeeds.conf opkg update 6. 安装编译工具 执行以下命令,安装编译工具: opkg install gcc make libpthread libstdcpp 7. 编写Makefile文件 在任意目录下创建一个文件夹,例如:/opt/my_package,并在该文件夹下创建一个名为Makefile的文件。在Makefile文件中编写软件包编译规则。 以下是一个简单的Makefile文件示例: ``` include $(TOPDIR)/rules.mk PKG_NAME:=hello-world PKG_VERSION:=1.0 PKG_RELEASE:=1 include $(INCLUDE_DIR)/package.mk define Package/hello-world SECTION:=utils CATEGORY:=Utilities TITLE:=Hello World DEPENDS:=@TARGET_ramips_mt7620a endef define Package/hello-world/description This is a Hello World package. endef define Build/Compile $(MAKE) -C $(PKG_BUILD_DIR) $(TARGET_CONFIGURE_OPTS) endef define Package/hello-world/install $(INSTALL_DIR) $(1)/bin $(INSTALL_BIN) $(PKG_BUILD_DIR)/hello-world $(1)/bin/ endef $(eval $(call BuildPackage,hello-world)) ``` 8. 编译软件包 执行以下命令,编译软件包: make package/hello-world/compile V=s 编译完成后,在SDK目录下的bin目录中可以找到编译好的软件包。 9. 安装软件包编译好的软件包拷贝到路由器上,并执行以下命令安装: opkg install hello-world_1.0-1_ramips_24kec.ipk 安装完成后,在路由器上执行hello-world命令即可看到输出结果。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值