AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / unix / 问题 / 763597
Accepted
StoneThrow
StoneThrow
Asked: 2023-12-12 05:12:41 +0800 CST2023-12-12 05:12:41 +0800 CST 2023-12-12 05:12:41 +0800 CST

如何安装 apt-get 不可用的软件包版本?

  • 772

我想在 Ubuntu WSL 实例上安装 libuv,并且特别需要版本 1.45.0 或更高版本。

我的理解(来自本教程文章)是,查找可安装的软件包版本的命令是apt list | grep:

$ apt list | grep libuv

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

libuv1-dev/jammy,now 1.43.0-1 amd64 [installed]
libuv1/jammy,now 1.43.0-1 amd64 [installed,automatic]
libuvc-dev/jammy 0.0.6-1.1 amd64
libuvc-doc/jammy 0.0.6-1.1 all
libuvc0/jammy 0.0.6-1.1 amd64

...这让我认为只有 1.43.0-1 可供安装apt-get,并且它已经安装了。

但libuv 的 GitHub 站点表明有更新的版本。

如何在我的 Ubuntu 实例上使用 libuv v1.45.0(或更高版本)apt-get?

虽然我的迫切需求是特定于 libuv 的,但我实际上想总体了解 Unix/Linux 生态系统的这个方面:驱动程序/包/等之间的关系是什么。似乎是“已发布”(例如根据其 GitHub 页面)与包管理器“可用”的内容,例如apt-get?如果用户想要一个软件包管理器无法提供的较新版本的软件包,他们应该怎么做?他们应该下载源代码并在本地编译吗?


更新:为什么我需要 1.45.0,即为什么我需要比我的包管理器提供的版本更高级的版本?

我的Linux机器是一个开发环境,我需要在其中编译到主机(即我们可以忽略这个问题的上下文的交叉编译)。我需要编译的应用程序(不是我编写的)依赖于uv_timespec64_t,这显然是在 libuv v1.45.0 中引入的(根据git merge/diff)。

因此,这就是这个问题的前提:我需要编译(到主机)一个应用程序,该应用程序依赖于比我的 Linux 发行版的包管理器提供的更新版本的 libuv 中的功能。


更新:这个问题有一个相关的后续问题:为什么不同的 Linux 发行版有不同的包格式(和包管理器)?

apt
  • 2 2 个回答
  • 87 Views

2 个回答

  • Voted
  1. Best Answer
    eyoung100
    2023-12-12T07:50:40+08:002023-12-12T07:50:40+08:00

    树干和树木

    在 @TechLoom 回答您有关 的问题的同时libuv,请允许我回答您有关 Linux 生态系统的问题。让我们从这张图的时间线

    在新的浏览器选项卡中打开它,请注意有 5 个主要主干:

    1. 斯莱克软件
    2. 德班
    3. Red Hat 走向了企业化,免费版本被称为 Fedora
    4. 以诺(Enoch)的寿命很短,后来成为了 Gentoo
    5. 拱

    每个分支以及所有子分支主要由正在使用的包管理系统定义。

    • The base Slackware uses zip/unzip/tar. The package is unzipped and compiled manually
    • Debian, of which Ubuntu is a child, uses APT - the Advanced Packaging Tool IIRC
    • Red Hat/Fedora uses RPM - RPM Package Manager
    • Enoch and its children compile everything from scratch using scripting. Imagine Slackware, but automated and configurable
    • Arch is a hybrid, that has held up really well over the years. Users can have a completely binary packaged system, i.e. packaged like Debian, or a completely compiled system like Enoch, or a mixture of both.

    Now, as for how the ecosystem is connected. Each package manager is configured to connect only to its specified package tree, also called a repository. Debian-based systems connect to APT based trees, where you can download and install .deb files. Each of these package managers allows users to install custom trees. Ubuntu-based systems call them PPAs, or Personal Package Archives.

    Release Cycles

    Each distribution, regardless of the package manger has a release cycle. Release cycles can be thought of as "locked repositories" or using the tree analogy: "healthy trees that don't grow anymore." The repositories only contain packages that belong to that certain release. In general, packages installed by the release are never altered, and only updated in rare cases i.e., when a critical bugfix is released (which is why you cannot find libuv-1.45 in the jammy release), but if you look in mantic and noble, the next few codenames for Future Releases, you can see the package has been bumped (see Version Bumps below). Software like browsers and mail clients are generally released to the contrib(short for contributed) repository, which doesn't interfere with the main repository. In Debian's terminology, I believe they call their contributed repository universe, which fits rather well (every piece of user software under the sun can be put there). Each added package is compiled against the libraries and tools in the main repository, packaged and uploaded to the universe repository. This imitates the "locked repository" concept for software added by users or companies.

    In Ubuntu's case the release cycle generally occurs twice a year (once in April, and once in October, barring a minor version update [the 3rd version number]). You can see this by looking at the Ubuntu Release List. The accepted practice is to only use packages available in your release until that package is updated by the maintainer.

    Note that some distributions use a rolling release model, specifically those that are source based. I can issue an update command on my source compiled Gentoo box, rebuild packages, and an hour later perform the same update and possibly update the same packages again.

    Even our friends, or enemies depending on your preference, over at Microsoft have adopted a Release Model starting with Windows 10. The current release of Windows 11 is versioned as 23H2, or the 2nd half of 2023. The first major version of Windows 10 I remember was 1903, referring to March 2019. While Microsoft's "tree" isn't publicly available it is used to integrate updates based on bug fixes and user requests into future versions of Windows.

    Why Version Locking Is Important

    To understand why the locked concept is so important, imagine you owned a BMW anything. BMW's are mostly all hand built and hand tuned. Let's say that we decide we want to add Feature X from the 2025 model to our model we bought in 2023 without talking to BMW first.

    • We buy the part needed to enable Feature X from the web
    • We go to install that part in the Dashboard and hook into the electrical system, and realize that the part for Feature X, requires a special connector.
    • We attempt to connect Feature X's part without the connector and end up damaging our 6-figure car
    • We contact BMW, and tell them I tried to connect feature X, but did more damage than upgrading. BMW sends us a connector and tells us to have the authorized mechanic put everything together

    I bolded that last bullet to tie all this together. In the above "upgrade" BMW is maintainer of the "locked repository." BMW owns or can access all the parts for most all of it's cars when asked. The special connector doesn't exist outside the tree. In the same way you can only add software or upgrades to your Ubuntu version, a.k.a. the cars in this story, if the software exists in the repository. Mixing repositories from different versions causes complete breakage. If Feature X needs to be added or upgraded in a previous version, the software is backported, and get's added to that particular version's main repository (the mechanic), and the version continues operating as intended (the car is repaired).

    Version Bumps

    版本升级(即从 1.43 到 1.45)通常按如下方式完成:

    1. 维护者注意到新版本,或者用户向维护者提交版本更新请求
    2. 请求的版本将发送到测试版本以测试稳定性。在 Ubuntu 中,这称为未来版本
    3. 该软件包经过测试,并在未来版本成为当前版本时被撤销或批准并发布

    LTS 版本

    对于需要稳定性的用户,某些发行版使用长期服务版本的概念。这些通常是具有关键任务应用程序(例如 Web 服务器、防火墙或域控制器)的区域的首选。

    • 3
  2. TechLoom
    2023-12-12T05:35:03+08:002023-12-12T05:35:03+08:00

    您可以从 github 页面下载源代码。

    https://github.com/libuv/libuv/releases

    然后只需提取源文件并编译程序,然后安装即可。所有步骤都在 github 页面上。

    https://github.com/libuv/libuv#build-instructions

    $ sh autogen.sh
    $ ./configure
    $ make
    $ make check
    $ make install
    

    另一种选择是查看是否有人拥有该项目的存储库。然后你可以使用“add-apt-repository”,然后像你想要的那样使用 apt 。

    • 2

相关问题

  • 在发行版的不同版本中混合软件时要寻找什么?

  • 了解 apt 列表输出

  • 尝试安装 debian 软件包 npm,使 apt-get 删除 libssl-dev

  • 如何下载软件包而不是使用 apt-get 命令安装它?

  • /etc/apt/sources.list.d 比 /etc/apt/sources.list 有什么好处

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    模块 i915 可能缺少固件 /lib/firmware/i915/*

    • 3 个回答
  • Marko Smith

    无法获取 jessie backports 存储库

    • 4 个回答
  • Marko Smith

    如何将 GPG 私钥和公钥导出到文件

    • 4 个回答
  • Marko Smith

    我们如何运行存储在变量中的命令?

    • 5 个回答
  • Marko Smith

    如何配置 systemd-resolved 和 systemd-networkd 以使用本地 DNS 服务器来解析本地域和远程 DNS 服务器来解析远程域?

    • 3 个回答
  • Marko Smith

    dist-upgrade 后 Kali Linux 中的 apt-get update 错误 [重复]

    • 2 个回答
  • Marko Smith

    如何从 systemctl 服务日志中查看最新的 x 行

    • 5 个回答
  • Marko Smith

    Nano - 跳转到文件末尾

    • 8 个回答
  • Marko Smith

    grub 错误:你需要先加载内核

    • 4 个回答
  • Marko Smith

    如何下载软件包而不是使用 apt-get 命令安装它?

    • 7 个回答
  • Martin Hope
    user12345 无法获取 jessie backports 存储库 2019-03-27 04:39:28 +0800 CST
  • Martin Hope
    Carl 为什么大多数 systemd 示例都包含 WantedBy=multi-user.target? 2019-03-15 11:49:25 +0800 CST
  • Martin Hope
    rocky 如何将 GPG 私钥和公钥导出到文件 2018-11-16 05:36:15 +0800 CST
  • Martin Hope
    Evan Carroll systemctl 状态显示:“状态:降级” 2018-06-03 18:48:17 +0800 CST
  • Martin Hope
    Tim 我们如何运行存储在变量中的命令? 2018-05-21 04:46:29 +0800 CST
  • Martin Hope
    Ankur S 为什么 /dev/null 是一个文件?为什么它的功能不作为一个简单的程序来实现? 2018-04-17 07:28:04 +0800 CST
  • Martin Hope
    user3191334 如何从 systemctl 服务日志中查看最新的 x 行 2018-02-07 00:14:16 +0800 CST
  • Martin Hope
    Marko Pacak Nano - 跳转到文件末尾 2018-02-01 01:53:03 +0800 CST
  • Martin Hope
    Kidburla 为什么真假这么大? 2018-01-26 12:14:47 +0800 CST
  • Martin Hope
    Christos Baziotis 在一个巨大的(70GB)、一行、文本文件中替换字符串 2017-12-30 06:58:33 +0800 CST

热门标签

linux bash debian shell-script text-processing ubuntu centos shell awk ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve