当前位置:网站首页>树莓派更新工具链
树莓派更新工具链
2022-07-03 07:11:00 【_seaside_】
在其他环境上 编译的bin文件,在我的树莓派上竟然无法运行,原来是由于glibc的库太旧导致,所以只能升级树莓派的glibc了。
查看一下树莓派上libc的版本:
strings /lib/aarch64-linux-gnu/libc.so.6 |grep GLIBC_
升级步骤:
1. get 2.34 glibc from internet
wget http://ftp.gnu.org/gnu/glibc/glibc-2.34.tar.gz
2. tar -zxvf glibc-2.34.tar.gz
3. cd glibc-2.34
4. mkdir build
5. cd build
6. sudo apt-get install bison (if you haven't never install bison, bison --version to look version )
6. ../configure --prefix=/opt/glibc-2.34
7. sudo make install
8.删除libc.so.6之后可能导致系统命令不可用的情况, 可使用如下方法解决:
LD_PRELOAD=/opt/glibc-2.29/lib/libc-2.29.so ln -s /opt/glibc-2.29/lib/libc-2.29.so /lib/aarch64-linux-gnu/libc.so.6
如果上述更新失败可使用如下命令还原:
LD_PRELOAD=/lib/aarch64-linux-gnu/libc-2.31.so ln -s /lib/aarch64-linux-gnu/libc-2.31.so /lib/aarch64-linux-gnu/libc.so.6 // libc-2.31.so 此项是系统升级前的版本
在configure和make阶段,将花很长很长的时间,后来实在无法忍受,就把操作系统升级了,升级到22.04版本,glibc就比较新了,然后再运行其他环境编译的程序,果然运行OK。
边栏推荐
- On the practice of performance optimization and stability guarantee
- How to plan well?
- Resttemplate configuration use
- File links cannot be opened or downloaded in Google browser
- Interface learning
- Abstract learning
- Win 10 find the port and close the port
- "Baidu Cup" CTF game 2017 February, Web: blast-1
- Software testing assignment - day 3
- 3311. Longest arithmetic
猜你喜欢

Practical plug-ins in idea

JUC forkjoinpool branch merge framework - work theft

JMeter test result output

“百度杯”CTF比赛 2017 二月场,Web:爆破-1

The 10000 hour rule won't make you a master programmer, but at least it's a good starting point

On the practice of performance optimization and stability guarantee

Inno setup production and installation package

2022 - 06 - 23 vgmp - OSPF - Inter - Domain Security Policy - nat Policy (Update)

dataworks自定义函数开发环境搭建

Pytest -- write and manage test cases
随机推荐
3311. Longest arithmetic
Integration test practice (1) theoretical basis
Crontab scheduled task
Centos切换安装mysql5.7和mysql8.0
How to plan well?
Advanced API (batch image Download & socket dialog)
MySQL mistakenly deleted the root account and failed to log in
Thoughts in Starbucks
【已解决】Unknown error 1146
Jenkins
MySQL installation
Split small interface
[most detailed] latest and complete redis interview book (50)
JMeter test result output
LeetCode
Distributed lock
“百度杯”CTF比赛 2017 二月场,Web:爆破-1
Resthighlevelclient gets the mapping of an index
"Baidu Cup" CTF game 2017 February, Web: blast-1
[Code] occasionally take values, judge blanks, look up tables, verify, etc