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

news2025/2/8 5:53:55

原因:

想安装 .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 的过程。

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

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

某咨询大数据解决方案介绍(32页PPT)

本文档介绍了一个大数据平台解决方案&#xff0c;旨在解决企业当前面临的数据问题&#xff0c;包括数据定义缺失、重复采集和存储、数据不完整以及缺乏可靠决策依据等。通过引入大数据技术&#xff0c;该方案强调从被动的IT支撑向主动的数据核心服务转型&#xff0c;以实现科学…

matlab simulink 汽车四分之一模型主动被动悬架-LQR

1、内容简介 略 matlab simulink 可以交流、咨询、答疑 124- 2、内容说明 略汽车悬架系统由弹性元件、导向元件和减振器组成,是车身与车轴之间连接的所有组合体零件的总称,也是车架(或承载式车身)与车桥(或车轮)之间一切力传递装置的总称,其主要功能是使车轮与地面有很好的…

从零开始:OpenCV 图像处理快速入门教程

文章大纲 第1章 OpenCV 概述 1.1 OpenCV的模块与功能  1.2 OpenCV的发展 1.3 OpenCV的应用 第2章 基本数据类型 2.1 cv::Vec类 2.2 cv&#xff1a;&#xff1a;Point类 2.3 cv&#xff1a;&#xff1a;Rng类 2.4 cv&#xff1a;&#xff1a;Size类 2.5 cv&#xff1a;&…

强化学习笔记6——异同策略、AC、等其他模型总结

异步两种方法&#xff1a;1&#xff1a;经验回放 2&#xff1a;数据动作非同时产生 举例QLearning为什么是异策略&#xff1f; 生成动作时e的概率从Q表选&#xff0c;1-e概况随机。 更新策略时&#xff0c;贪心策略选择Q_max作为动作。 策略优化两种主要方法&#xff1a;基于梯…

Linux提权--passwd提权

passwd​ 命令用于更改用户密码。在 Linux 系统中&#xff0c;普通用户可以通过 passwd​ 更改自己的密码&#xff0c;但如果攻击者能够以某种方式执行 passwd​ 命令更改 root 用户的密码&#xff0c;他们就能获取 root 权限。 1.常见的 passwd 提权方法 SUID 设置&#xff1…

一、本地部署安装 DeepSeek 并训练本地知识库,并调用对话框进行问答

本地部署安装 DeepSeek 1、硬件环境 操作系统&#xff1a;Windows10 内存&#xff1a;16G 显卡&#xff1a;NIVIDIA GeForce RTX 2060 6G 2、安装步骤 &#xff08;1&#xff09;安装 Ollama 访问Ollama 官网&#xff0c;点击 “Download for Windows” 下载安装程序。下载…

海思的一站式集成环境Hispark Studio更新了

HiSpark Studio是海思提供的面向智能设备开发者提供一站式集成开发环境&#xff0c;支持代码编辑、编译、烧录和调试等功能。我以前在评测星闪芯片的时候用过&#xff0c;当时写了篇博客&#xff1a;【星闪开发连载】WS63E开发板Windows环境的构建_hispark studio-CSDN博客。那…

unity学习29:摄像机camera相关skybox 和 Render Texture测试效果

目录 1 摄像机 1.1 每个Scene里都自带一个摄像机 camera 1.2 可以创建多个camera 1.3 下面先看backgroundtype: 2 backgroundtype: 天空盒 skybox 2.1 清除标志,清除&#xff1a;天空盒 自选天空盒 2.2 window /Asset Store 2.3 导入skybox 3 backgroundtype: 纯色…

【Elasticsearch】Geo-distance聚合

geo_distance聚合的形状是圆形。它基于一个中心点&#xff08;origin&#xff09;和一系列距离范围来计算每个文档与中心点的距离&#xff0c;并将文档分配到相应的距离范围内。这种聚合方式本质上是以中心点为圆心&#xff0c;以指定的距离范围为半径的圆形区域来划分数据。 为…

音频进阶学习十二——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;当 …

easyxor

easyxor 一、查壳 无壳&#xff0c;64位 二、IDA分析 1.main 2.查看key与r(shifee提取) 三、脚本 r [0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, …

通过多层混合MTL结构提升股票市场预测的准确性,R²最高为0.98

“Boosting the Accuracy of Stock Market Prediction via Multi-Layer Hybrid MTL Structure” 论文地址&#xff1a;https://arxiv.org/pdf/2501.09760 ​​​​​​​ 摘要 本研究引入了一种创新的多层次混合多任务学习架构&#xff0c;致力于提升股市预测的效能。此架构融…

日本游戏机市场5年来首次陷入萎缩;特斯拉招人推进人形机器人量产;任天堂专利显示Switch2手柄可用作鼠标...| 游戏智眼日报

美团成立“算法顾问委员会” 美团宣布&#xff0c;近日&#xff0c;由外部专家学者组成的算法顾问委员会成立&#xff0c;为美团改进算法提供常态化咨询和指导。每个季度美团将举办算法恳谈会&#xff0c;持续邀请骑手、商家、用户、专家学者和媒体代表等共同参加。美团表示&a…

114-机器学习分类算法

1、内容简介 略 matlab simulink 114-机器学习分类算法可以交流、咨询、答疑 2、内容说明 略 Elong_6.24。ROCAUC confusion newdata Unbalanced_LR.car 3、仿真分析 略 4、参考论文 略

【论文阅读】On the Security of “VOSA“

On the Security of Verifiable and Oblivious Secure Aggregation for Privacy-Preserving Federated Learning -- 关于隐私保护联邦中可验证与遗忘的安全聚合的安全性 论文来源摘要Introduction回顾 VOSA 方案对VOSA不可伪造性的攻击对于类型 I 的攻击对于类型 II 的攻击 论文…

储能系统-系统架构

已更新系列文章包括104、61850、modbus 、单片机等&#xff0c;欢迎关注 IEC61850实现方案和测试-1-CSDN博客 快速了解104协议-CSDN博客 104调试工具2_104协议调试工具-CSDN博客 1 电池储能系统&#xff08;BESS&#xff09; 架构 电池储能系统主要包括、电池、pcs、本地控制…

ip属地是手机号还是手机位置?一文理清

在数字化和网络化的今天&#xff0c;IP属地这一概念逐渐成为了人们关注的焦点。特别是在社交媒体和在线平台上&#xff0c;IP属地的显示往往让人联想到用户的地理位置。然而&#xff0c;关于IP属地到底与手机号还是手机位置有关&#xff0c;却存在着不少误解和混淆。本文将深入…

迅为RK3568开发板篇OpenHarmony实操HDF驱动控制LED-编写应用APP

在应用代码中我们实现如下功能&#xff1a; 当应用程序启动后会获取命令行参数。如果命令行没有参数&#xff0c;LED 灯将循环闪烁&#xff1b;如果命令行带有参数&#xff0c;则根据传输的参数控制 LED 灯的开启或关闭。通过 HdfIoServiceBind 绑定 LED灯的 HDF 服务&#xff…

【Elasticsearch】terms聚合误差问题

Elasticsearch中的聚合查询在某些情况下确实可能存在误差&#xff0c;尤其是在处理分布式数据和大量唯一值时。这种误差主要来源于以下几个方面&#xff1a; 1.分片数据的局部性 Elasticsearch的索引通常被分成多个分片&#xff0c;每个分片独立地计算聚合结果。由于数据在分…

JavaScript的 switch 方法

• 1. 浅说JavaScript的 switch 方法 • 1.1. 语法 • 1.2. 关键点 • 1.3. 示例 • 1.4. 注意事项 1. 浅说JavaScript的 switch 方法 在JavaScript中&#xff0c;switch 语句是一种多分支选择结构&#xff0c;用于根据不同的条件执行不同的代码块。 它提供了一种比多个…