arm rk3588 升级glibc2.31到2.33

一、查看glibc版本

复制代码
root@ztl:~# ldd --version
ldd (Ubuntu GLIBC 2.31-0ubuntu9.2) 2.31
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.

得出当前glibc版本为2.31

二、添加源

使用ubuntu-ports的source list,如

复制代码
http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/

这里说明下ubuntu/和ubuntu-ports/的区别:

  • 前者是achieve源,收录的架构为 AMD64 (x86_64) 和 Intel x86。
  • 后者是ports源,收录的架构为 arm64,armhf,PowerPC,ppc64el 和 s390x等,对于树莓派等ARM架构的开发板,需要使用ports源。

以ubuntu 22.04为例,可以使用如下清华源:

执行:

复制代码
sudo vim /etc/apt/sources.list

添加:

复制代码
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ jammy main restricted universe multiverse

# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ jammy main restricted universe multiverse

deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ jammy-updates main restricted universe multiverse

# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ jammy-updates main restricted universe multiverse

deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ jammy-backports main restricted universe multiverse

# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ jammy-backports main restricted universe multiverse

# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ jammy-security main restricted universe multiverse

# # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ jammy-security main restricted universe multiverse

deb http://ports.ubuntu.com/ubuntu-ports/ jammy-security main restricted universe multiverse

然后执行:

复制代码
sudo apt-get update
sudo apt install libc6

再次查看glibc版本:

复制代码
root@ztl:~# ldd --version
ldd (Ubuntu GLIBC 2.35-0ubuntu3.8) 2.35
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.

三、其他方式

执行

复制代码
sudo vim /etc/apt/sources.list

添加:

复制代码
deb [arch=amd64,i386] http://archive.ubuntu.com/ubuntu/ xenial main universe
deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports xenial main universe

参考:

复制代码
You have errors in the sources.list configuration files.

The binary packages for arm64 architecture are not available on the same repository servers as the i386 and amd64 packages, but only on the ports.ubuntu.com server.

Do you really need binaries for arm64 architecture?

If no, then you should remove arm64 as foreign architecture with the command
sudo dpkg --remove-architecture arm64

If you need that additional architecture (e.g. because of doing cross-compilation), you have to reorganize your sources.list files and separate the lines for i386 and amd64 from those for arm64, something like

deb [arch=amd64,i386] http://archive.ubuntu.com/ubuntu/ xenial main universe
deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports xenial main universe

In any case you have to make sure that the command "sudo apt-get update" does not show any error message (like 404 Not found) any more.
相关推荐
待什么青丝20 小时前
【TMS570LC4357】之相关驱动开发学习记录1
c语言·arm开发·驱动开发·学习
南玖yy2 天前
x86 汇编逻辑运算全解析:从【位操作】到实际应用(AND,OR,NOT,XOR,TEST)
开发语言·汇编·arm开发·后端·架构·策略模式
菜只因C3 天前
嵌入式系统:从技术原理到未来趋势(驱动程序篇)
arm开发
!chen5 天前
鲲鹏Arm+麒麟V10 K8s 离线部署教程
java·arm开发·kubernetes
ScilogyHunter5 天前
ARM P15协处理器指令详解:架构、编程与应用实践
arm开发·协处理器指令·cp15
apolloyhl6 天前
1-Wire 一线式总线:从原理到实战,玩转 DS18B20 温度采集
arm开发·stm32·单片机·嵌入式硬件
二进制coder6 天前
芯片:数字时代的算力引擎——鲲鹏、升腾、海光、Intel 全景解析
arm开发·架构·硬件架构
荆楚闲人6 天前
Keil MDK5.37或更高版本不再预装ARM Compiler Version5导致编译错误的解决方法
arm开发
MonKingWD6 天前
【Redis原理】四万字总结Redis网络模型的全部概念
网络·arm开发·redis
程序猿阿伟6 天前
《算力觉醒!ONNX Runtime + DirectML如何点燃Windows ARM设备的AI引擎》
arm开发·人工智能