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.
相关推荐
sz66cm2 小时前
Linux基础 -- ARM 32 位架构动态注入代码技术文档
linux·arm开发·架构
weixin_11223321 小时前
基于ARM的嵌入式温度控制系统的设计
arm开发
亿道电子Emdoor21 小时前
【ARM】如何通过ARMDS的Map文件查看堆栈调用情况
arm开发·stm32·单片机
___波子 Pro Max.2 天前
ARM Cortex-M处理器中的MSP和PSP
linux·arm开发
WIFI_BT_DEV2 天前
Linux设备驱动开发-UART驱动
linux·arm开发·驱动开发·嵌入式硬件·硬件架构·信息与通信·gnu
WIFI_BT_DEV2 天前
Linux设备驱动开发-PCI/PCIE
c语言·arm开发·驱动开发·嵌入式硬件·硬件架构·信息与通信·信号处理
爱学嵌入式2 天前
linux驱动编程配置----(二)
linux·运维·arm开发
WIFI_BT_DEV2 天前
Linux设备驱动开发-Pinctrl子系统使用详解
linux·c语言·arm开发·驱动开发·嵌入式硬件·硬件工程·信息与通信
至少零下七度2 天前
如何查找 UBuntu的 arm版本
arm开发·数据库·ubuntu
WIFI_BT_DEV3 天前
Linux设备驱动开发-中断
linux·c语言·arm开发·驱动开发·嵌入式硬件·硬件架构·gnu