7. 安装软件包
原生的openwrt 里没有安装一些额外用到的软件包(即插件),下面记录一下怎么在imx8平台的 openwrt 上安装软件包,并且在 luci 界面的服务选项里使用
原生luci界面没有服务选项
1. openwrt 换软件源 /etc/opkg/distfeeds.conf
# 原始源 #src/gz openwrt_core https://downloads.openwrt.org/releases/23.05.0-rc1/targets/imx/imx8/packages #src/gz openwrt_base https://downloads.openwrt.org/releases/23.05.0-rc1/packages/aarch64_generic/base #src/gz openwrt_luci https://downloads.openwrt.org/releases/23.05.0-rc1/packages/aarch64_generic/luci #src/gz openwrt_packages https://downloads.openwrt.org/releases/23.05.0-rc1/packages/aarch64_generic/packages #src/gz openwrt_routing https://downloads.openwrt.org/releases/23.05.0-rc1/packages/aarch64_generic/routing #src/gz openwrt_telephony https://downloads.openwrt.org/releases/23.05.0-rc1/packages/aarch64_generic/telephony # 换为清华源 src/gz openwrt_base https://mirrors.tuna.tsinghua.edu.cn/openwrt/releases/23.05.0-rc1/packages/aarch64_generic/base src/gz openwrt_luci https://mirrors.tuna.tsinghua.edu.cn/openwrt/releases/23.05.0-rc1/packages/aarch64_generic/luci src/gz openwrt_packages https://mirrors.tuna.tsinghua.edu.cn/openwrt/releases/23.05.0-rc1/packages/aarch64_generic/packages src/gz openwrt_routing https://mirrors.tuna.tsinghua.edu.cn/openwrt/releases/23.05.0-rc1/packages/aarch64_generic/routing src/gz openwrt_telephony https://mirrors.tuna.tsinghua.edu.cn/openwrt/releases/23.05.0-rc1/packages/aarch64_generic/telephony root@OpenWrt:/#
换源后一定要访问一下 源的链接,能正常访问才行,比如在浏览器里访问 https://mirrors.tuna.tsinghua.edu.cn/openwrt/releases/23.05.0-rc1/packages/aarch64_generic/base
注意点:https://downloads.openwrt.org/releases/23.05.0-rc1/targets/imx/imx8/packages 这个地址实际没有,找不到,所以导致系统会缺少一些库,后面再讲怎么处理
编辑文件 /etc/opkg.conf,或者在 luci界面 系统-->软件包-->配置opkg
dest root / dest ram /tmp lists_dir ext /var/opkg-lists option overlay_root /overlay #option check_signature // 注释掉这句
2. 在命令行输入 opkg update,或者在 luci界面 系统-->软件包-->更新列表
root@OpenWrt:/# opkg update Downloading https://mirrors.tuna.tsinghua.edu.cn/openwrt/releases/23.05.0-rc1/packages/aarch64_generic/base/Packages.gz Updated list of available packages in /var/opkg-lists/openwrt_base Downloading https://mirrors.tuna.tsinghua.edu.cn/openwrt/releases/23.05.0-rc1/packages/aarch64_generic/luci/Packages.gz Updated list of available packages in /var/opkg-lists/openwrt_luci Downloading https://mirrors.tuna.tsinghua.edu.cn/openwrt/releases/23.05.0-rc1/packages/aarch64_generic/packages/Packages.gz Updated list of available packages in /var/opkg-lists/openwrt_packages Downloading https://mirrors.tuna.tsinghua.edu.cn/openwrt/releases/23.05.0-rc1/packages/aarch64_generic/routing/Packages.gz Updated list of available packages in /var/opkg-lists/openwrt_routing Downloading https://mirrors.tuna.tsinghua.edu.cn/openwrt/releases/23.05.0-rc1/packages/aarch64_generic/telephony/Packages.gz Updated list of available packages in /var/opkg-lists/openwrt_telephony root@OpenWrt:/#
没有保存,就代表成功了
3. 安装软件包
在命令行输入 opkg install aria2,或者在 luci界面 系统-->软件包-->筛选器里输入 aria2,搜索到aria2后点击安装就行了,不报错代表安装成功
再以同样的方法安装 luci-app-aria2,这里会提示没有libstdcpp6,就是因为前面说没有 https://downloads.openwrt.org/releases/23.05.0-rc1/targets/imx/imx8/packages 的缘故
解决方法:在命令行输入以下命令 下载(wget ) 并安装(opkg install) libstdcpp6库,这里我找了一下,使用rockchip的库:https://mirrors.aliyun.com/openwrt/releases/22.03.1/targets/rockchip/armv8/packages/libstdcpp6_11.2.0-4_aarch64_generic.ipk
也可以:在 /etc/opkg/distfeeds.conf 直接加上:src/gz openwrt_base https://mirrors.aliyun.com/openwrt/releases/22.03.1/targets/rockchip/armv8/packages/
src/gz openwrt_base https://mirrors.aliyun.com/openwrt/releases/22.03.1/targets/rockchip/armv8/packages //会和 packages/aarch64_generic/base 里的软件包冲突 src/gz openwrt_base https://mirrors.tuna.tsinghua.edu.cn/openwrt/releases/23.05.0-rc1/packages/aarch64_generic/base src/gz openwrt_luci https://mirrors.tuna.tsinghua.edu.cn/openwrt/releases/23.05.0-rc1/packages/aarch64_generic/luci src/gz openwrt_packages https://mirrors.tuna.tsinghua.edu.cn/openwrt/releases/23.05.0-rc1/packages/aarch64_generic/packages src/gz openwrt_routing https://mirrors.tuna.tsinghua.edu.cn/openwrt/releases/23.05.0-rc1/packages/aarch64_generic/routing src/gz openwrt_telephony https://mirrors.tuna.tsinghua.edu.cn/openwrt/releases/23.05.0-rc1/packages/aarch64_generic/telephony
参考:小米AX6/AX3600安装libstdcpp6 · Jimi's Blog (jimizhou.com)
root@OpenWrt:/# wget https://mirrors.aliyun.com/openwrt/releases/22.03.1/targets/rockchip/armv8/packages/libstdcpp6_11.2.0-4_aarch64_generic.ipk Downloading 'https://mirrors.aliyun.com/openwrt/releases/22.03.1/targets/rockchip/armv8/packages/libstdcpp6_11.2.0-4_aarch64_generic.ipk' Connecting to 124.225.10.225:443 Writing to 'libstdcpp6_11.2.0-4_aarch64_generic.ipk' libstdcpp6_11.2.0-4_ 100% |*******************************| 416k 0:00:00 ETA Download completed (426711 bytes) root@OpenWrt:/# opkg install ./ bin/ dev/ etc/ lib/ lib64/ libstdcpp6_11.2.0-4_aarch64_generic.ipk mnt/ overlay/ proc/ rom/ root/ sbin/ sys/ tmp/ usr/ var/ www/ root@OpenWrt:/# opkg install ./libstdcpp6_11.2.0-4_aarch64_generic.ipk Installing libstdcpp6 (11.2.0-4) to root... Configuring libstdcpp6. root@OpenWrt:/#
接着安装 luci-app-aria2,就可以了。
完成 luci-app-aria2 后,luci界面出现了服务的选项,里面有一个app,那就是 Aria2
4. 总结一下
安装软件包,可以在 luci 界面上操作 (系统-->软件包)界面
也可以在命令行操作
# 安装本地软件包 opkg install ./libstdcpp6_11.2.0-4_aarch64_generic.ipk # 安装软件源里有的软件包 opkg install xxx.ipk
posted on 2024-09-11 17:21 f1engmin11 阅读(54) 评论(0) 编辑 收藏 举报