gpt4 book ai didi

ruby - 如何使用 apt 安装指定版本的 Ruby

转载 作者:行者123 更新时间:2023-12-03 08:32:02 25 4
gpt4 key购买 nike

我尝试安装指定版本2.5.1的Ruby(该版本只是示例),并尝试以下脚本,但出现如下错误。是否可以使用 apt 安装来安装 Ruby 版本,以便我可以处理 Ruby 版本依赖问题?

$ sudo apt update ; sudo apt install ruby-full=2.5.1
Hit:1 http://dl.google.com/linux/chrome/deb stable InRelease
Get:2 https://download.docker.com/linux/ubuntu bionic InRelease [64.4 kB]
Hit:3 http://us.archive.ubuntu.com/ubuntu bionic InRelease
Hit:4 http://ppa.launchpad.net/kelleyk/emacs/ubuntu bionic InRelease
Hit:5 http://security.ubuntu.com/ubuntu bionic-security InRelease
Hit:6 http://us.archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:7 http://us.archive.ubuntu.com/ubuntu bionic-backports InRelease
Hit:8 http://ppa.launchpad.net/ondrej/php/ubuntu bionic InRelease
Hit:9 http://ppa.launchpad.net/teejee2008/timeshift/ubuntu bionic InRelease
Fetched 64.4 kB in 2s (41.9 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
40 packages can be upgraded. Run 'apt list --upgradable' to see them.
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Version '2.5.1' for 'ruby-full' was not found

最佳答案

您可以安装rbenv,这是一个 Ruby 环境,然后您可以在其上安装您想要的 Ruby 版本。

引用this answer .

关于ruby - 如何使用 apt 安装指定版本的 Ruby,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64843921/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com