当前位置: 首页 > news >正文

64位Ubuntu20.04.5 LTS系统安装32位运行库

背景:
在ubutu(版本为20.04.5 LTS)中运行./arm-none-linux-gnueabi-gcc -v 后提示“no such device”。
经多方查证,是ubutu的版本是64位的,而需要运行的编译工具链是32位的,因此会不兼容。
解决方法就是在ubuntu中安装32位的运行环境

如何安装32位的运行环境:
执行以下3条命令:

sudo apt-get install libc6:i386
sudo apt-get install lib32z1
sudo apt-get install libncurses5:i386

但是问题就来了,当你在执行上面3条命令中的任意一条时,你大概率会出现各种404的错误,就是你无法访问到下载的网站!!
那么就要先进行下面的操作。

Ubuntu 配置国内源

1.找到替换的镜像源

该操作就是将ubuntu自己链接的镜像源更新,重新链接到国内的镜像源,这样下载就会快很多啦。依然选择使用人数比较多的清华的。
镜像源网站链接:
清华大学开源软件镜像站

在这里插入图片描述
打开之后就是上面这个样子,只需要在这里选择你安装的ubuntu版本。然后把下面这里的内容全部复制!!!

2.替换ubuntu自带的源为清华的源
接下来回到ubuntu中。
首先将ubuntu自带的源备份

root@ubuntu:/home/jian# cd /
root@ubuntu:/# cd /etc/apt
root@ubuntu:/etc/apt# sudo cp sources.list sources.list.bak//备份源文件

完成备份后就可以修改原来的文件的了,就是这里的sources.list

vim sources.list//使用vim编辑器打开sources.list进行编辑

这里是已经替换成清华镜像的内容了

:wq//退出vim编辑器

3.更新替换好的镜像源,让系统生效

root@ubuntu:/etc/apt# sudo apt-get update//更新镜像源
命中:1 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal InRelease
获取:2 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-updates InRelease [114 kB]
获取:3 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-backports InRelease [108 kB]
获取:4 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal/main Translation-zh_CN [113 kB]
获取:5 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal/restricted Translation-zh_CN [1,324 B]
获取:6 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal/universe Translation-zh_CN [388 kB]
获取:7 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
获取:8 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal/multiverse Translation-zh_CN [4,612 B]
获取:9 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-updates/main i386 Packages [883 kB]
获取:10 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-updates/main amd64 Packages [2,851 kB]
获取:11 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-updates/main Translation-en [468 kB]
获取:12 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-updates/main amd64 DEP-11 Metadata [275 kB]
获取:13 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-updates/main DEP-11 48x48 Icons [60.8 kB]
获取:14 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-updates/main DEP-11 64x64 Icons [98.3 kB]
获取:15 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-updates/main amd64 c-n-f Metadata [17.1 kB]
获取:16 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-updates/restricted amd64 Packages [2,327 kB]
获取:17 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages [2,435 kB]
获取:18 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-updates/restricted i386 Packages [33.7 kB]
获取:19 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-updates/restricted Translation-en [325 kB]
获取:20 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-updates/restricted amd64 c-n-f Metadata [576 B]
获取:21 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-updates/universe amd64 Packages [1,115 kB]
获取:22 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-updates/universe i386 Packages [747 kB]
获取:23 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-updates/universe Translation-en [266 kB]
获取:24 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-updates/universe amd64 DEP-11 Metadata [410 kB]
获取:25 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-updates/universe DEP-11 48x48 Icons [280 kB]
获取:26 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-updates/universe DEP-11 64x64 Icons [493 kB]
获取:27 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-updates/universe amd64 c-n-f Metadata [25.5 kB]
获取:28 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-updates/multiverse i386 Packages [8,436 B]
获取:29 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-updates/multiverse amd64 Packages [25.8 kB]
获取:30 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-updates/multiverse Translation-en [7,484 B]
获取:31 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-updates/multiverse amd64 DEP-11 Metadata [940 B]
获取:32 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-updates/multiverse amd64 c-n-f Metadata [620 B]
获取:33 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-backports/main amd64 Packages [45.7 kB]
获取:34 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-backports/main i386 Packages [36.1 kB]
获取:35 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-backports/main amd64 DEP-11 Metadata [8,008 B]
获取:36 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-backports/main DEP-11 48x48 Icons [7,156 B]
获取:37 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-backports/main DEP-11 64x64 Icons [10.7 kB]
获取:38 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-backports/main amd64 c-n-f Metadata [1,420 B]
获取:39 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-backports/universe i386 Packages [13.8 kB]
获取:40 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-backports/universe amd64 Packages [25.0 kB]
获取:41 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-backports/universe Translation-en [16.3 kB]
获取:42 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-backports/universe amd64 DEP-11 Metadata [30.5 kB]
获取:43 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-backports/universe DEP-11 48x48 Icons [13.3 kB]
获取:44 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-backports/universe DEP-11 64x64 Icons [22.7 kB]
获取:45 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-backports/universe amd64 c-n-f Metadata [880 B]
获取:46 http://security.ubuntu.com/ubuntu focal-security/main i386 Packages [646 kB]
获取:47 http://security.ubuntu.com/ubuntu focal-security/main Translation-en [382 kB]
获取:48 http://security.ubuntu.com/ubuntu focal-security/main amd64 DEP-11 Metadata [59.9 kB]
获取:49 http://security.ubuntu.com/ubuntu focal-security/main DEP-11 48x48 Icons [18.9 kB]
获取:50 http://security.ubuntu.com/ubuntu focal-security/main DEP-11 64x64 Icons [36.0 kB]
获取:51 http://security.ubuntu.com/ubuntu focal-security/main DEP-11 64x64@2 Icons [29 B]
获取:52 http://security.ubuntu.com/ubuntu focal-security/main amd64 c-n-f Metadata [13.1 kB]
获取:53 http://security.ubuntu.com/ubuntu focal-security/restricted i386 Packages [32.3 kB]
获取:54 http://security.ubuntu.com/ubuntu focal-security/restricted amd64 Packages [2,173 kB]
获取:55 http://security.ubuntu.com/ubuntu focal-security/restricted Translation-en [304 kB]
获取:56 http://security.ubuntu.com/ubuntu focal-security/restricted amd64 c-n-f Metadata [580 B]
获取:57 http://security.ubuntu.com/ubuntu focal-security/universe i386 Packages [613 kB]
获取:58 http://security.ubuntu.com/ubuntu focal-security/universe amd64 Packages [881 kB]
获取:59 http://security.ubuntu.com/ubuntu focal-security/universe Translation-en [185 kB]
获取:60 http://security.ubuntu.com/ubuntu focal-security/universe amd64 DEP-11 Metadata [96.3 kB]
获取:61 http://security.ubuntu.com/ubuntu focal-security/universe DEP-11 48x48 Icons [52.0 kB]
获取:62 http://security.ubuntu.com/ubuntu focal-security/universe DEP-11 64x64 Icons [101 kB]
获取:63 http://security.ubuntu.com/ubuntu focal-security/universe DEP-11 64x64@2 Icons [29 B]
获取:64 http://security.ubuntu.com/ubuntu focal-security/universe amd64 c-n-f Metadata [19.1 kB]
获取:65 http://security.ubuntu.com/ubuntu focal-security/multiverse i386 Packages [7,196 B]
获取:66 http://security.ubuntu.com/ubuntu focal-security/multiverse amd64 Packages [23.6 kB]
获取:67 http://security.ubuntu.com/ubuntu focal-security/multiverse Translation-en [5,504 B]
获取:68 http://security.ubuntu.com/ubuntu focal-security/multiverse amd64 DEP-11 Metadata [940 B]
获取:69 http://security.ubuntu.com/ubuntu focal-security/multiverse DEP-11 48x48 Icons [1,867 B]
获取:70 http://security.ubuntu.com/ubuntu focal-security/multiverse DEP-11 64x64 Icons [2,497 B]
获取:71 http://security.ubuntu.com/ubuntu focal-security/multiverse DEP-11 64x64@2 Icons [29 B]
获取:72 http://security.ubuntu.com/ubuntu focal-security/multiverse amd64 c-n-f Metadata [548 B]
已下载 19.9 MB,耗时 9(2,289 kB/s)                                          
正在读取软件包列表... 完成

4.测试源是否可以使用
安装一个好玩的包,安装完成sl包后运行一下,会有惊喜,如果你笑了,那就证明源起作用了。

root@ubuntu:/etc/apt# sudo apt-get install sl//安装sl包
正在读取软件包列表... 完成
正在分析软件包的依赖关系树       
正在读取状态信息... 完成       
下列【新】软件包将被安装:sl
升级了 0 个软件包,新安装了 1 个软件包,要卸载 0 个软件包,有 323 个软件包未被升级。
需要下载 12.7 kB 的归档。
解压缩后会消耗 60.4 kB 的额外空间。
获取:1 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal/universe amd64 sl amd64 5.02-1 [12.7 kB]
已下载 12.7 kB,耗时 0(29.9 kB/s)
正在选中未选择的软件包 sl。
(正在读取数据库 ... 系统当前共安装有 179299 个文件和目录。)
准备解压 .../archives/sl_5.02-1_amd64.deb  ...
正在解压 sl (5.02-1) ...
正在设置 sl (5.02-1) ...
正在处理用于 man-db (2.9.1-1) 的触发器 ...
root@ubuntu:/etc/apt# sl//运行sl

好了,现在再到上面安装32位的系统运行环境,应该就没问题了。这里更新了镜像源,在整个linux开发中都是很有用的,因为后续如果要安装其他的包,都会很方便,而不用再愁一直访问失败了。

相关文章:

64位Ubuntu20.04.5 LTS系统安装32位运行库

背景: 在ubutu(版本为20.04.5 LTS)中运行./arm-none-linux-gnueabi-gcc -v 后提示“no such device”。 经多方查证,是ubutu的版本是64位的,而需要运行的编译工具链是32位的,因此会不兼容。 解决方法就是在…...

关于vue.config.js

关于vue.config.js 简述 vue.config.js是一个可选的配置文件,如果项目的根目录中存在这个文件,那么它就会被vue/cli-service自动加载。你也可以使用package.json中的vue字段,但是注意这种写法需要你严格遵守JSON的格式来写。 这个文件应该…...

Jupyter NoteBook 中使用 cv2.imshow 显示图片

Jupyter NoteBook 中使用 cv2.imshow 显示图片 有两种办法: 用 cv2.imshow时加入cv2.destroyAllWindows() 用 plt.imshow() 代替 cv2.imshowhttps://blog.csdn.net/kuweicai/article/details/103359299...

gpt扣款失败,openai扣款失败无法使用-如何解决gpt扣款失败的问题?

gpt扣款失败,openai扣款失败无法使用。毕竟你花了钱却无法使用你所期待的服务,这种情况确实令人不快。但是, 为什么gpt扣款失败? 可能是由于支付问题导致的扣款失败。这包括信用卡额度不足、支付信息错误等等。如果你的支付信息…...

OJ练习第180题——颠倒二进制位

颠倒二进制位 力扣链接:190. 颠倒二进制位 题目描述 颠倒给定的 32 位无符号整数的二进制位。 提示: 请注意,在某些语言(如 Java)中,没有无符号整数类型。在这种情况下,输入和输出都将被指…...

SpringSecurity授权--前端进行访问控制

目录 &#xff08;1&#xff09;引入依赖 &#xff08;2&#xff09;页面 SpringSecurity可以在一些视图技术中进行控制显示效果。例如Thymeleaf中&#xff0c;只有登录用户拥有某些权限才会展示一些菜单 &#xff08;1&#xff09;引入依赖 <!--Spring Security整合Thyme…...

如何看待Unity新的收费模式?

文章目录 背景Unity的论点开发者的担忧如何看待Unity新的收费模式&#xff1f;1. 理解Unity的立场2. 考虑小型开发者3. 探索替代方案4. 对市场变化保持敏感5. 提高游戏质量 结论 &#x1f389; 如何看待Unity新的收费模式&#xff1f; ☆* o(≧▽≦)o *☆嗨~我是IT陈寒&#x1…...

WebRTC系列--sdp协商中的answer编解码协商过程

关于createAnswer的流程在前面的文章WebRTC系列-SDP之CreateAnswer这篇文章中有详细的分析。 这篇文章主要对于MediaSessionDescriptionFactory的AddAudioContentForAnswer做详细的分析,也就是说对于音频编码的匹配也是在这个方法里实现: 首先主要的函数调用如下图: 这篇文…...

WeCanStudio工具套件介绍

直接上视频,在超燃的《天马座幻想》的背景音乐下&#xff0c;再次了解一下该工具套件吧。 WeCanStudio开发套件介绍...

图形化思维:Graphviz和DOT语言的艺术与实践

前言 Graphviz和DOT语言是一对强大的工具&#xff0c;用于创建各种类型的图形&#xff0c;从流程图和组织结构图到网络拓扑图&#xff0c;无所不能。它们的灵活性和自定义性使得它们在数据可视化、系统设计、项目规划等各个领域都备受欢迎。然而&#xff0c;要想真正掌握Graph…...

如何查看电脑详细配置、型号?这4个技巧 yyds!

知道自己电脑的配置和型号&#xff0c;可以更合理合适的去安装软件&#xff0c;避免出现电脑系统和软件不兼容问题。 了解详细配置信息可以检测一下电脑组件是否是二手的。 从解决实际问题的角度&#xff0c;推荐这4个技巧&#xff1a; 1、右键“此电脑” 2、设备管理器查看…...

安卓机型固件系统分区的基础组成 手机启动规律初步常识 各分区的基本含义与说明

此贴为基本常识。感兴趣的友友可以了解手机的启动顺序和各模式的基本操作与意义。另外了解手机系统分区各文件夹的含义 分区说明对应贴&#xff1a;安卓机型固件中分区对应说明 手机开机基本启动顺序 当我们按下手机开机键的时候。基本的启动顺序为 注意&#xff1a;该结构图…...

php如何把数组元素反转-array_reverse使用要点

在PHP中&#xff0c;你可以使用array_reverse()函数来反转数组的元素顺序。该函数会返回一个新的数组&#xff0c;其中的元素顺序与原始数组相反。 以下是使用array_reverse()函数反转数组的示例代码&#xff1a; <?php $originalArray array(a, b, c, d); $reversedArr…...

【CV学习笔记】tensorrtx-yolov5 逐行代码解析

1、前言 TensorRTx(下文简称为trtx)是一个十分流行的利用API来搭建网络结构实现trt加速的开源库&#xff0c;作者提到为什么不用ONNX parser的方式来进行trt加速&#xff0c;而用最底层的API来搭建trt加速的方式有如下原因: Flexible 很容易修改模型的任意一层&#xff0c;删…...

微信管理系统可以解决什么问题?

微信作为一款社交通讯软件&#xff0c;已经成为人们日常生活中不可缺少的工具。不仅个人&#xff0c;很多企业都用微信来联系客户、维护客户和营销&#xff0c;这自然而然就会有很多微信账号、手机也多&#xff0c;那管理起来就会带来很多的不便&#xff0c;而微信管理系统正好…...

mysql事务测试

mysql的事务处理主要有两种方法1、用begin,rollback,commit来实现 begin; -- 开始一个事务 rollback; -- 事务回滚 commit; -- 事务提交 2、直接用set来改变mysql的自动提交模式 mysql默认是自动提交的&#xff0c;也就是你提交一个sql&#xff0c;它就直接执行&#xff01;我…...

Spring面试题14:Spring中什么是Spring Beans? 包含哪些?Spring容器提供几种方式配置元数据?Spring中怎样定义类的作用域?

该文章专注于面试,面试只要回答关键点即可,不需要对框架有非常深入的回答,如果你想应付面试,是足够了,抓住关键点 面试官:Spring中什么是Spring Beans? 包含哪些? 在Spring中,Spring Beans是指由Spring容器管理的对象。Spring Beans包含以下内容: 类定义(Class De…...

Tomcat部署、优化、以及操作练习

一.Tomcat的基本介绍 1.1.Tomcat是什么&#xff1f; Tomcat服务器是一个免费的开放源代码的Web应用服务器&#xff0c;属于轻量级应用服务器&#xff0c;在中小型系统和并发访问用户不是很多的场合下被普遍使用&#xff0c;是开发和调试JSP程序的首选。一般来说&#xff0c;T…...

服务器假死日志按时间统计排查

文章目录 场景解决方案排查过程根据cost时间来筛选 场景 服务器假死&#xff0c;进程还在&#xff0c;但是已经接不到请求了。因此有客户报事&#xff0c;发现服务假死了。 解决方案 这种假死问题一般不太好排查&#xff0c;常规来说有几种可能。 1、慢sql导致卡死。 2、大数…...

CSS——grid网格布局的基本使用

网格布局在实现页面自适应&#xff0c;大屏可视化中常常使用&#xff0c;在这篇博客里&#xff0c;记录一下网格布局的基本使用。 参考文档&#xff1a;网格布局_菜鸟教程 文章目录 1. 体会grid的自适应性2. grid-template-arr配置网格行列3. 网格单位fr与repeat()简写属性值4…...

蓝牙 BLE 扫描面试题大全(2):进阶面试题与实战演练

前文覆盖了 BLE 扫描的基础概念与经典问题蓝牙 BLE 扫描面试题大全(1)&#xff1a;从基础到实战的深度解析-CSDN博客&#xff0c;但实际面试中&#xff0c;企业更关注候选人对复杂场景的应对能力&#xff08;如多设备并发扫描、低功耗与高发现率的平衡&#xff09;和前沿技术的…...

【CSS position 属性】static、relative、fixed、absolute 、sticky详细介绍,多层嵌套定位示例

文章目录 ★ position 的五种类型及基本用法 ★ 一、position 属性概述 二、position 的五种类型详解(初学者版) 1. static(默认值) 2. relative(相对定位) 3. absolute(绝对定位) 4. fixed(固定定位) 5. sticky(粘性定位) 三、定位元素的层级关系(z-i…...

如何将联系人从 iPhone 转移到 Android

从 iPhone 换到 Android 手机时&#xff0c;你可能需要保留重要的数据&#xff0c;例如通讯录。好在&#xff0c;将通讯录从 iPhone 转移到 Android 手机非常简单&#xff0c;你可以从本文中学习 6 种可靠的方法&#xff0c;确保随时保持连接&#xff0c;不错过任何信息。 第 1…...

【Zephyr 系列 10】实战项目:打造一个蓝牙传感器终端 + 网关系统(完整架构与全栈实现)

🧠关键词:Zephyr、BLE、终端、网关、广播、连接、传感器、数据采集、低功耗、系统集成 📌目标读者:希望基于 Zephyr 构建 BLE 系统架构、实现终端与网关协作、具备产品交付能力的开发者 📊篇幅字数:约 5200 字 ✨ 项目总览 在物联网实际项目中,**“终端 + 网关”**是…...

NPOI操作EXCEL文件 ——CAD C# 二次开发

缺点:dll.版本容易加载错误。CAD加载插件时&#xff0c;没有加载所有类库。插件运行过程中用到某个类库&#xff0c;会从CAD的安装目录找&#xff0c;找不到就报错了。 【方案2】让CAD在加载过程中把类库加载到内存 【方案3】是发现缺少了哪个库&#xff0c;就用插件程序加载进…...

【LeetCode】3309. 连接二进制表示可形成的最大数值(递归|回溯|位运算)

LeetCode 3309. 连接二进制表示可形成的最大数值&#xff08;中等&#xff09; 题目描述解题思路Java代码 题目描述 题目链接&#xff1a;LeetCode 3309. 连接二进制表示可形成的最大数值&#xff08;中等&#xff09; 给你一个长度为 3 的整数数组 nums。 现以某种顺序 连接…...

Kafka主题运维全指南:从基础配置到故障处理

#作者&#xff1a;张桐瑞 文章目录 主题日常管理1. 修改主题分区。2. 修改主题级别参数。3. 变更副本数。4. 修改主题限速。5.主题分区迁移。6. 常见主题错误处理常见错误1&#xff1a;主题删除失败。常见错误2&#xff1a;__consumer_offsets占用太多的磁盘。 主题日常管理 …...

AI语音助手的Python实现

引言 语音助手(如小爱同学、Siri)通过语音识别、自然语言处理(NLP)和语音合成技术,为用户提供直观、高效的交互体验。随着人工智能的普及,Python开发者可以利用开源库和AI模型,快速构建自定义语音助手。本文由浅入深,详细介绍如何使用Python开发AI语音助手,涵盖基础功…...

C++11 constexpr和字面类型:从入门到精通

文章目录 引言一、constexpr的基本概念与使用1.1 constexpr的定义与作用1.2 constexpr变量1.3 constexpr函数1.4 constexpr在类构造函数中的应用1.5 constexpr的优势 二、字面类型的基本概念与使用2.1 字面类型的定义与作用2.2 字面类型的应用场景2.2.1 常量定义2.2.2 模板参数…...

break 语句和 continue 语句

break语句和continue语句都具有跳转作用&#xff0c;可以让代码不按既有的顺序执行 break break语句用于跳出代码块或循环 1 2 3 4 5 6 for (var i 0; i < 5; i) { if (i 3){ break; } console.log(i); } continue continue语句用于立即终…...