通过2021 root方法获取到权限后,初步尝试了一下通过opkg安装ipk,做个记录,供大家参考。[root@OTCloud_0000:/root]#opkg print-architecture
arch arm 3
[root@OTCloud_0000:/root]#
因为Raspberry Pi2 b+和玩客云同是armv7l架构,所以选用这个为参考源,修改/etc/opkg/opkg.conf
- [root@OTCloud_0000:/]#cat /etc/opkg/opkg.conf
- src/gz snapshots https://update.peiluyou.com/conf/mcloud_advanced/packages
- src/gz base https://archive.openwrt.org/snapshots/trunk/brcm2708/generic/packages/base
- src/gz luci https://archive.openwrt.org/snapshots/trunk/brcm2708/generic/packages/luci
- src/gz routing https://archive.openwrt.org/snapshots/trunk/brcm2708/generic/packages/routing
- src/gz packages https://archive.openwrt.org/snapshots/trunk/brcm2708/generic/packages/packages
- src/gz management https://archive.openwrt.org/snapshots/trunk/brcm2708/generic/packages/management
- src/gz telephony https://archive.openwrt.org/snapshots/trunk/brcm2708/generic/packages/telephony
- dest root /
- dest ram /tmp
- arch all 1
- arch noarch 1
- arch brcm2708 10
- arch arm 3
- option lists_dir /var/opkg-lists
- option overlay_root /overlay
- [root@OTCloud_0000:/]#
复制代码
运行opkg update后,可以通过以下命令安装ipk:
- [root@OTCloud_0000:/media/sda2]#opkg install git-http --nodeps
- Installing git-http (2.15.1) on root.
- Configuring git-http.
- grep: /usr/lib/opkg/info/git-http.control: No such file or directory
- cat: can’t open ‘/usr/lib/opkg/info/git-http.list’: No such file or directory
- [root@OTCloud_0000:/media/sda2]#opkg install git --nodeps
- Installing git (2.15.1) on root.
- Configuring git.
- grep: /usr/lib/opkg/info/git.control: No such file or directory
- cat: can’t open ‘/usr/lib/opkg/info/git.list’: No such file or directory
- [root@OTCloud_0000:/media/sda2]#git
- -sh: git: not found
- [root@OTCloud_0000:/media/sda2]#file /usr/bin/git
- /usr/bin/git: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-musl-armhf.so.1, corrupted section header size
- [root@OTCloud_0000:/media/sda2]#
复制代码
可以发现最新的源C库已经换成了musl
而玩客云的C库是glibc
- [root@OTCloud_0000:/media/sda2]#file /usr/bin/hexdump
- /usr/bin/hexdump: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 3.1.1, BuildID[sha1]=512a3f4ed08b5fd6b178e92498902fc9a66acbcf, stripped
- [root@OTCloud_0000:/lib]#ls ld-* -al
- -rwxr-xr-x 1 root root 123470 Jun 30 2020 ld-2.19-2014.05.so
- lrwxrwxrwx 1 root root 18 Jun 30 2020 ld-linux-armhf.so.3 -> ld-2.19-2014.05.so
复制代码
更换源:
- src/gz base https://archive.openwrt.org/chaos_calmer/15.05/brcm2708/bcm2709/packages/base
- src/gz luci https://archive.openwrt.org/chaos_calmer/15.05/brcm2708/bcm2709/packages/luci
- src/gz routing https://archive.openwrt.org/chaos_calmer/15.05/brcm2708/bcm2709/packages/routing
- src/gz packages https://archive.openwrt.org/chaos_calmer/15.05/brcm2708/bcm2709/packages/packages
- src/gz management https://archive.openwrt.org/chaos_calmer/15.05/brcm2708/bcm2709/packages/management
- src/gz telephony https://archive.openwrt.org/chaos_calmer/15.05/brcm2708/bcm2709/packages/telephony
复制代码
- [root@OTCloud_0000:/media/sda2]#file /usr/bin/git
- /usr/bin/git: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-uClibc.so.0, corrupted section header size
- [root@OTCloud_0000:/media/sda2]#
复制代码
C库为uClibc
貌似有点麻烦,最后下载chaos_calmer源码选择glibc后再编译本地包安装。Advanced configuration options (for developers) —>
Toolchain Options —>
C Library implementation (Use (e)glibc) —>
(e)glibc version (eglibc 2.19) —>
评论区