侧边栏壁纸
博主头像
华灯上 博主等级

行动起来,活在当下

  • 累计撰写 176 篇文章
  • 累计创建 24 个标签
  • 累计收到 3 条评论

目 录CONTENT

文章目录

玩客云通过opkg安装ipk的方法

华灯
2024-04-15 / 0 评论 / 0 点赞 / 25 阅读 / 0 字

通过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

  1. [root@OTCloud_0000:/]#cat /etc/opkg/opkg.conf
  2. src/gz snapshots https://update.peiluyou.com/conf/mcloud_advanced/packages
  3. src/gz base https://archive.openwrt.org/snapshots/trunk/brcm2708/generic/packages/base
  4. src/gz luci https://archive.openwrt.org/snapshots/trunk/brcm2708/generic/packages/luci
  5. src/gz routing https://archive.openwrt.org/snapshots/trunk/brcm2708/generic/packages/routing
  6. src/gz packages https://archive.openwrt.org/snapshots/trunk/brcm2708/generic/packages/packages
  7. src/gz management https://archive.openwrt.org/snapshots/trunk/brcm2708/generic/packages/management
  8. src/gz telephony https://archive.openwrt.org/snapshots/trunk/brcm2708/generic/packages/telephony
  9. dest root /
  10. dest ram /tmp
  11. arch all 1
  12. arch noarch 1
  13. arch brcm2708 10
  14. arch arm 3
  15. option lists_dir /var/opkg-lists
  16. option overlay_root /overlay
  17. [root@OTCloud_0000:/]#

复制代码

运行opkg update后,可以通过以下命令安装ipk:

  1. [root@OTCloud_0000:/media/sda2]#opkg install git-http --nodeps
  2. Installing git-http (2.15.1) on root.
  3. Configuring git-http.
  4. grep: /usr/lib/opkg/info/git-http.control: No such file or directory
  5. cat: can’t open ‘/usr/lib/opkg/info/git-http.list’: No such file or directory
  6. [root@OTCloud_0000:/media/sda2]#opkg install git --nodeps
  7. Installing git (2.15.1) on root.
  8. Configuring git.
  9. grep: /usr/lib/opkg/info/git.control: No such file or directory
  10. cat: can’t open ‘/usr/lib/opkg/info/git.list’: No such file or directory
  11. [root@OTCloud_0000:/media/sda2]#git
  12. -sh: git: not found
  13. [root@OTCloud_0000:/media/sda2]#file /usr/bin/git
  14. /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
  15. [root@OTCloud_0000:/media/sda2]#

复制代码

可以发现最新的源C库已经换成了musl
而玩客云的C库是glibc

  1. [root@OTCloud_0000:/media/sda2]#file /usr/bin/hexdump
  2. /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
  3. [root@OTCloud_0000:/lib]#ls ld-* -al
  4. -rwxr-xr-x 1 root root 123470 Jun 30 2020 ld-2.19-2014.05.so
  5. lrwxrwxrwx 1 root root 18 Jun 30 2020 ld-linux-armhf.so.3 -> ld-2.19-2014.05.so

复制代码

更换源:

  1. src/gz base https://archive.openwrt.org/chaos_calmer/15.05/brcm2708/bcm2709/packages/base
  2. src/gz luci https://archive.openwrt.org/chaos_calmer/15.05/brcm2708/bcm2709/packages/luci
  3. src/gz routing https://archive.openwrt.org/chaos_calmer/15.05/brcm2708/bcm2709/packages/routing
  4. src/gz packages https://archive.openwrt.org/chaos_calmer/15.05/brcm2708/bcm2709/packages/packages
  5. src/gz management https://archive.openwrt.org/chaos_calmer/15.05/brcm2708/bcm2709/packages/management
  6. src/gz telephony https://archive.openwrt.org/chaos_calmer/15.05/brcm2708/bcm2709/packages/telephony

复制代码

  1. [root@OTCloud_0000:/media/sda2]#file /usr/bin/git
  2. /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
  3. [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) —>

0
  1. 支付宝打赏

    qrcode alipay
  2. 微信打赏

    qrcode weixin
  3. QQ打赏

    qrcode qq

评论区