< OS 有关 > Ubuntu 版本升级 实践 24.04 -> 24.10, 安装 .NET

原因:

想安装 .NET 9 去编译 GitHut 项目,这回用不熟悉的 Ubuntu来做,不知道怎么拐去给 Ubuntu 升级,看到现在版本是 24.10 但不是 LTS 版本,记录下升级过程。

一、实践过程:

1. 查看当前版本

命令1: 

lsb_release -a

命令 2:

hostnamectl

这个在 QNAP 的 Ubuntu Linux Station 是 24.04.01 LTS

命令 3:

cat /etc/os-release

2. 版本升级

1)必要的软件包:

  • update-manager (需要有图形显示)  : 管理软件更新与升级的,以命令行来运行的工具。我读文章时没领悟到,当运后明白了 “update-manager is a command-line utility in Ubuntu that provides a graphical interface for managing software updates and upgrades” :
  • update-manager-core :核心软件包,在 Ubuntu 中管理软件更新功能。

2)安装必要软件包:

sudo apt install update-manager update-manager-core

3)安装升级 (终端里,无图形界面)

sudo do-release-upgrade -c

上面信息表示:在 /etc/update-manager/release-upgrades 文件里,被设置为不支持升级。

不支持升级的解决方法:

修改上面提到的文件

sudo vi /etc/update-manager/release-upgrades

把 Prompt 从 never 改为你想要到,我用的是 lts,防止误升级到非 LTS 版。

解释各参数含义:

Prompt=normal:如果有多个升级,升级到最新的。但不升会级到 LTS 版本。
Prompt=lts:如果有多个升级,升级到最近的 LTS。
我在网上查,还有个 any,但在我的配置文件中,没有提到。

再次运行:

程序已经测试到有新的版本,但不是 LTS 版本,所以没有升级。

说明正常

如果你使用非 TLS 或接受从 TLS 升级到非 TLS版本,在上面的文件里,参数改为 normal,再运行这个命令。 大版本升级需要重启系统的,做之前先备份。 不然跟做 rm -fr / 没什么区别。 

业务系统,先在测试环境跑通,写出 SOP 验证后再上手。

二、在 Ubuntu 安装 .NET

参考文档:

Install .NET on Ubuntu - .NET | Microsoft Learn

以下只是翻译

1. 添加软件仓库

sudo add-apt-repository ppa:dotnet/backports

2. 安装 SDK

sudo apt-get update && \
  sudo apt-get install -y dotnet-sdk-9.0

3. 安装 Runtime

1) 有 ASP.NET core

sudo apt-get update && \
  sudo apt-get install -y aspnetcore-runtime-9.0

2) 没有 ASP.NET core

sudo apt-get install -y dotnet-runtime-9.0

在微软文章中有提:依赖关系

Breaking change: System.Drawing.Common only supported on Windows - .NET | Microsoft Learn

检查安装依赖包:

多说一点, 用 dpkg 命令查询是否已经安装上图中和软件包:

for package in ca-certificates libc6 libgcc-s1 libicu74 liblttng-ust1 libssl3 libstdc++6 libunwind8 zlib1g; do dpkg -s "$package"; done

输出如下:

admin@ub1:~$ for package in ca-certificates libc6 libgcc-s1 libicu74 liblttng-ust1 libssl3 libstdc++6 libunwind8 zlib1g; do dpkg -s "$package"; done
Package: ca-certificates
Status: install ok installed
Priority: standard
Section: misc
Installed-Size: 386
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Architecture: all
Multi-Arch: foreign
Version: 20240203
Depends: openssl (>= 1.1.1), debconf (>= 0.5) | debconf-2.0
Breaks: ca-certificates-java (<< 20121112+nmu1)
Enhances: openssl
Description: Common CA certificates
 Contains the certificate authorities shipped with Mozilla's browser to allow
 SSL-based applications to check for the authenticity of SSL connections.
 .
 Please note that Debian can neither confirm nor deny whether the
 certificate authorities whose certificates are included in this package
 have in any way been audited for trustworthiness or RFC 3647 compliance.
 Full responsibility to assess them belongs to the local system
 administrator.
Original-Maintainer: Julien Cristau <jcristau@debian.org>
Package: libc6
Status: install ok installed
Priority: optional
Section: libs
Installed-Size: 13431
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Architecture: amd64
Multi-Arch: same
Source: glibc
Version: 2.39-0ubuntu8.3
Replaces: libc6-amd64
Depends: libgcc-s1
Recommends: libidn2-0 (>= 2.0.5~)
Suggests: glibc-doc, debconf | debconf-2.0, locales, libnss-nis, libnss-nisplus
Breaks: chrony (<< 4.2-3~), cyrus-imapd (<< 3.6.1-2ubuntu1), fakechroot (<< 2.19-3.5), firefox (<< 91~), firefox-esr (<< 91~), gnumach-image-1.8-486 (<< 2:1.8+git20210923~), gnumach-image-1.8-486-dbg (<< 2:1.8+git20210923~), gnumach-image-1.8-xen-486 (<< 2:1.8+git20210923~), gnumach-image-1.8-xen-486-dbg (<< 2:1.8+git20210923~), hurd (<< 1:0.9.git20220301-2), locales (<< 2.39), locales-all (<< 2.39), nscd (<< 2.39), python3-iptables (<< 1.0.0-2), scipy (<< 1.10.1-10build1), tinydns (<< 1:1.05-14), valgrind (<< 1:3.19.0-1~)
Conffiles:
 /etc/ld.so.conf.d/x86_64-linux-gnu.conf d4e7a7b88a71b5ffd9e2644e71a0cfab
Description: GNU C Library: Shared libraries
 Contains the standard libraries that are used by nearly all programs on
 the system. This package includes shared versions of the standard C library
 and the standard math library, as well as many others.
Homepage: https://www.gnu.org/software/libc/libc.html
Original-Maintainer: GNU Libc Maintainers <debian-glibc@lists.debian.org>
Original-Vcs-Browser: https://salsa.debian.org/glibc-team/glibc
Original-Vcs-Git: https://salsa.debian.org/glibc-team/glibc.git
Package: libgcc-s1
Protected: yes
Status: install ok installed
Priority: optional
Section: libs
Installed-Size: 197
Maintainer: Ubuntu Core developers <ubuntu-devel-discuss@lists.ubuntu.com>
Architecture: amd64
Multi-Arch: same
Source: gcc-14
Version: 14.2.0-4ubuntu2~24.04
Replaces: libgcc1 (<< 1:10)
Provides: libgcc1 (= 1:14.2.0-4ubuntu2~24.04)
Depends: gcc-14-base (= 14.2.0-4ubuntu2~24.04), libc6 (>= 2.35)
Description: GCC support library
 Shared version of the support library, a library of internal subroutines
 that GCC uses to overcome shortcomings of particular machines, or
 special needs for some languages.
Homepage: http://gcc.gnu.org/
Important: yes
Original-Maintainer: Debian GCC Maintainers <debian-gcc@lists.debian.org>
Package: libicu74
Status: install ok installed
Priority: optional
Section: libs
Installed-Size: 35919
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Architecture: amd64
Multi-Arch: same
Source: icu
Version: 74.2-1ubuntu3.1
Replaces: libiculx63 (<< 63.1-5)
Depends: libc6 (>= 2.38), libgcc-s1 (>= 3.3.1), libstdc++6 (>= 13.1)
Breaks: libiculx63 (<< 63.1-5), openttd (<< 1.8.0-2~)
Description: International Components for Unicode
 ICU is a C++ and C library that provides robust and full-featured
 Unicode and locale support.  This package contains the runtime
 libraries for ICU.
Homepage: https://icu.unicode.org/
Original-Maintainer: Laszlo Boszormenyi (GCS) <gcs@debian.org>
dpkg-query: package 'liblttng-ust1' is not installed and no information is available
Use dpkg --info (= dpkg-deb --info) to examine archive files.
dpkg-query: package 'libssl3' is not installed and no information is available
Use dpkg --info (= dpkg-deb --info) to examine archive files.
Package: libstdc++6
Status: install ok installed
Priority: optional
Section: libs
Installed-Size: 3110
Maintainer: Ubuntu Core developers <ubuntu-devel-discuss@lists.ubuntu.com>
Architecture: amd64
Multi-Arch: same
Source: gcc-14
Version: 14.2.0-4ubuntu2~24.04
Replaces: libstdc++6-14-dbg (<< 4.9.0-3)
Depends: gcc-14-base (= 14.2.0-4ubuntu2~24.04), libc6 (>= 2.38), libgcc-s1 (>= 4.3)
Breaks: gcc-4.3 (<< 4.3.6-1), gcc-4.4 (<< 4.4.6-4), gcc-4.5 (<< 4.5.3-2)
Conflicts: scim (<< 1.4.2-1)
Description: GNU Standard C++ Library v3
 This package contains an additional runtime library for C++ programs
 built with the GNU compiler.
 .
 libstdc++-v3 is a complete rewrite from the previous libstdc++-v2, which
 was included up to g++-2.95. The first version of libstdc++-v3 appeared
 in g++-3.0.
Homepage: http://gcc.gnu.org/
Original-Maintainer: Debian GCC Maintainers <debian-gcc@lists.debian.org>
Package: libunwind8
Status: install ok installed
Priority: optional
Section: libs
Installed-Size: 187
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Architecture: amd64
Multi-Arch: same
Source: libunwind
Version: 1.6.2-3build1.1
Replaces: libgcc1 (<< 1:4.0.0-2)
Depends: libc6 (>= 2.34), liblzma5 (>= 5.1.1alpha+20110809)
Conflicts: libunwind1-dev
Description: library to determine the call-chain of a program - runtime
 The primary goal of this project is to define a portable and efficient C
 programming interface (API) to determine the call-chain of a program.
 The API additionally provides the means to manipulate the preserved
 (callee-saved) state of each call-frame and to resume execution at any
 point in the call-chain (non-local goto). The API supports both local
 (same-process) and remote (across-process) operation. As such, the API
 is useful in a number of applications.
 .
 This package includes the shared libraries
Homepage: http://www.nongnu.org/libunwind
Original-Maintainer: Adrian Bunk <bunk@debian.org>
Package: zlib1g
Status: install ok installed
Priority: required
Section: libs
Installed-Size: 163
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Architecture: amd64
Multi-Arch: same
Source: zlib
Version: 1:1.3.dfsg-3.1ubuntu2.1
Provides: libz1
Depends: libc6 (>= 2.14)
Breaks: libxml2 (<< 2.7.6.dfsg-2), texlive-binaries (<< 2023.20230311.66589-8)
Conflicts: zlib1 (<= 1:1.0.4-7)
Description: compression library - runtime
 zlib is a library implementing the deflate compression method found
 in gzip and PKZIP.  This package includes the shared library.
Homepage: http://zlib.net/
Original-Maintainer: Mark Brown <broonie@debian.org>

总结,

我在文章里,介绍 Ubuntu 怎样版本升级。觉得内容简单,参考微软文档,演示安装 .NET 的过程。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:/a/966202.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

VsCode创建VUE项目

1. 首先安装Node.js和npm 通过网盘分享的文件&#xff1a;vsCode和Node&#xff08;本人电脑Win11安装&#xff09; 链接: https://pan.baidu.com/s/151gBWTFZh9qIDS9XWMJVUA 提取码: 1234 它们是运行和构建Vue.js应用程序所必需的。 1.1 Node安装&#xff0c;点击下一步即可 …

音频进阶学习十二——Z变换一(Z变换、收敛域、性质与定理)

文章目录 前言一、Z变换1.Z变换的作用2.Z变换公式3.Z的状态表示1&#xff09; r 1 r1 r12&#xff09; 0 < r < 1 0<r<1 0<r<13&#xff09; r > 1 r>1 r>1 4.关于Z的解释 二、收敛域1.收敛域的定义2.收敛域的表示方式3.ROC的分析1&#xff09;当 …

分布式微服务系统架构第91集:系统性能指标总结

加群联系作者vx&#xff1a;xiaoda0423 仓库地址&#xff1a;https://webvueblog.github.io/JavaPlusDoc/ 系统性能指标总结 系统性能指标包括哪些&#xff1f; 业务指标、资源指标、中间件指标、数据库指标、前端指标、稳定性指标、批量处理指标、可扩展性指标、可靠性指标。 …

【C语言标准库函数】指数与对数函数:exp(), log(), log10()

目录 一、头文件 二、函数简介 2.1. exp(double x) 2.2. log(double x) 2.3. log10(double x) 三、函数实现&#xff08;概念性&#xff09; 3.1. exp(double x) 的模拟实现 3.2. log(double x) 和 log10(double x) 的模拟实现 四、注意事项 4.1. exp(double x) 的注…

CSS Overflow 属性详解:控制内容溢出的利器

在前端开发中&#xff0c;处理内容溢出是一个常见的需求。CSS 提供了 overflow 属性&#xff0c;帮助我们控制当内容超出元素框时的显示方式。本文将详细介绍 overflow 属性的各种取值及其应用场景。 1. 什么是 overflow 属性&#xff1f; overflow 属性用于控制当元素的内容…

go语言中的接口

接口简介 现实生活中的接口 现实生活中手机、相机、U 盘都可以和电脑的 USB 接口建立连接。我们不需要关注 usb 卡槽大小是否一样&#xff0c;因为所有的 USB 接口都是按照统一的标准来设计的。 Golang 中的接口&#xff08;interface&#xff09; Golang 中的接口是一种抽象…

网络安全威胁框架与入侵分析模型概述

引言 “网络安全攻防的本质是人与人之间的对抗&#xff0c;每一次入侵背后都有一个实体&#xff08;个人或组织&#xff09;”。这一经典观点概括了网络攻防的深层本质。无论是APT&#xff08;高级持续性威胁&#xff09;攻击、零日漏洞利用&#xff0c;还是简单的钓鱼攻击&am…

Redis企业开发实战(三)——点评项目之优惠券秒杀

目录 一、全局唯一ID (一)概述 (二)全局ID生成器 (三)全局唯一ID生成策略 1. UUID (Universally Unique Identifier) 2. 雪花算法&#xff08;Snowflake&#xff09; 3. 数据库自增 4. Redis INCR/INCRBY 5.总结 (四)Redis实现全局唯一ID 1.工具类 2.测试类 3…

Verilog代码实例

Verilog语言学习&#xff01; 文章目录 目录 文章目录 前言 一、基本逻辑门代码设计和仿真 1.1 反相器 1.2 与非门 1.3 四位与非门 二、组合逻辑代码设计和仿真 2.1 二选一逻辑 2.2 case语句实现多路选择逻辑 2.3 补码转换 2.4 7段数码管译码器 三、时序逻辑代码设计和仿真 3.1…

排序算法--基数排序

核心思想是按位排序&#xff08;低位到高位&#xff09;。适用于定长的整数或字符串&#xff0c;如例如&#xff1a;手机号、身份证号排序。按数据的每一位从低位到高位&#xff08;或相反&#xff09;依次排序&#xff0c;每次排序使用稳定的算法&#xff08;如计数排序&#…

图形化界面MySQL(MySQL)(超级详细)

目录 1.官网地址 1.1在Linux直接点击NO thanks…? 1.2任何远端登录&#xff0c;再把jj数据库给授权 1.3建立新用户 优点和好处 示例代码&#xff08;MySQL Workbench&#xff09; 示例代码&#xff08;phpMyAdmin&#xff09; 总结 图形化界面 MySQL 工具大全及其功能…

C++ 使用CURL开源库实现Http/Https的get/post请求进行字串和文件传输

CURL开源库介绍 CURL 是一个功能强大的开源库&#xff0c;用于在各种平台上进行网络数据传输。它支持众多的网络协议&#xff0c;像 HTTP、HTTPS、FTP、SMTP 等&#xff0c;能让开发者方便地在程序里实现与远程服务器的通信。 CURL 可以在 Windows、Linux、macOS 等多种操作系…

mapbox进阶,添加绘图扩展插件,绘制圆形

👨‍⚕️ 主页: gis分享者 👨‍⚕️ 感谢各位大佬 点赞👍 收藏⭐ 留言📝 加关注✅! 👨‍⚕️ 收录于专栏:mapbox 从入门到精通 文章目录 一、🍀前言1.1 ☘️mapboxgl.Map 地图对象1.2 ☘️mapboxgl.Map style属性1.3 ☘️MapboxDraw 绘图控件二、🍀添加绘图扩…

网络工程师 (24)数据封装与解封装

一、数据封装 数据封装是指将协议数据单元&#xff08;PDU&#xff09;封装在一组协议头和尾中的过程。在OSI 7层参考模型中&#xff0c;数据从应用层开始&#xff0c;逐层向下封装&#xff0c;直到物理层。每一层都会为其PDU添加相应的协议头和尾&#xff0c;以包含必要的通信…

OSPF基础(3):区域划分

OSPF的区域划分 1、区域产生背景 路由器在同一个区域中泛洪LSA。为了确保每台路由器都拥有对网络拓扑的一致认知&#xff0c;LSDB需要在区域内进行同步。OSPF域如果仅有一个区域&#xff0c;随着网络规模越来越大&#xff0c;OSPF路由器的数量越来越多&#xff0c;这将导致诸…

C++----继承

一、继承的基本概念 本质&#xff1a;代码复用类关系建模&#xff08;是多态的基础&#xff09; class Person { /*...*/ }; class Student : public Person { /*...*/ }; // public继承 派生类继承基类成员&#xff08;数据方法&#xff09;&#xff0c;可以通过监视窗口检…

【DeepSeek】DeepSeek小模型蒸馏与本地部署深度解析DeepSeek小模型蒸馏与本地部署深度解析

一、引言与背景 在人工智能领域&#xff0c;大型语言模型&#xff08;LLM&#xff09;如DeepSeek以其卓越的自然语言理解和生成能力&#xff0c;推动了众多应用场景的发展。然而&#xff0c;大型模型的高昂计算和存储成本&#xff0c;以及潜在的数据隐私风险&#xff0c;限制了…

ZZNUOJ(C/C++)基础练习1081——1090(详解版)

目录 1081 : n个数求和 &#xff08;多实例测试&#xff09; C C 1082 : 敲7&#xff08;多实例测试&#xff09; C C 1083 : 数值统计(多实例测试) C C 1084 : 计算两点间的距离&#xff08;多实例测试&#xff09; C C 1085 : 求奇数的乘积&#xff08;多实例测试…

axios 发起 post请求 json 需要传入数据格式

• 1. axios 发起 post请求 json 传入数据格式 • 2. axios get请求 1. axios 发起 post请求 json 传入数据格式 使用 axios 发起 POST 请求并以 JSON 格式传递数据是前端开发中常见的操作。 下面是一个简单的示例&#xff0c;展示如何使用 axios 向服务器发送包含 JSON 数…

硬盘接入电脑提示格式化?是什么原因?怎么解决?

有时候&#xff0c;当你将硬盘接入电脑时&#xff0c;看到系统弹出“使用驱动器中的光盘之前需要将其格式化”的提示&#xff0c;肯定会感到十分困惑和焦虑。这种情况不仅让人担心数据丢失&#xff0c;也可能影响正常使用。为什么硬盘会突然要求格式化&#xff1f;是硬盘出了问…