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
    • 最新
    • 标签
主页 / ubuntu / 问题 / 1086630
Accepted
Enrique Moreno Tent
Enrique Moreno Tent
Asked: 2018-10-24 23:04:21 +0800 CST2018-10-24 23:04:21 +0800 CST 2018-10-24 23:04:21 +0800 CST

Ubuntu 18.04 - 准备安装 rbenv 时依赖关系中断

  • 772

我正在尝试使用本指南安装rbenv。为此,需要以下依赖项:

$ sudo apt install autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm5 libgdbm-dev

但这是我尝试从终端安装它们时得到的响应:

$ sudo apt install autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm5 libgdbm-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'libreadline-dev' instead of 'libreadline6-dev'
build-essential is already the newest version (12.4ubuntu1).
libgdbm5 is already the newest version (1.14.1-6).
zlib1g-dev is already the newest version (1:1.2.11.dfsg-0ubuntu2).
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libncurses5-dev : Depends: libtinfo5 (= 6.1-1ubuntu1) but 6.1-1ubuntu1.18.04 is to be installed
                   Depends: libncurses5 (= 6.1-1ubuntu1) but 6.1-1ubuntu1.18.04 is to be installed
                   Depends: libtinfo-dev (= 6.1-1ubuntu1) but it is not going to be installed
 libreadline-dev : Depends: libtinfo-dev but it is not going to be installed
 libssl-dev : Depends: libssl1.1 (= 1.1.0g-2ubuntu4) but 1.1.0g-2ubuntu4.1 is to be installed
E: Unable to correct problems, you have held broken packages.

好像我安装了一些损坏的软件包,但我不太确定。我该如何解决这个问题?

package-management dependencies apt
  • 6 6 个回答
  • 12006 Views

6 个回答

  • Voted
  1. Best Answer
    Enrique Moreno Tent
    2018-10-24T23:39:23+08:002018-10-24T23:39:23+08:00

    正如@guiverc 指出的那样,我错过了一些来源。

    我去了“软件和更新”,在“更新”选项卡下,检查了“重要的安全更新”和“推荐的更新”。(不知道为什么他们没有被检查......)

    之后,一切正常。

    • 4
  2. Kavin Chauhan
    2019-05-31T02:00:08+08:002019-05-31T02:00:08+08:00

    我面临同样的问题,我在 /etc/apt/source.list 的源列表中启用了“bionic-updates”“bionic-security”行。然后 apt-get update 并尝试再次安装这些软件包。

    • 1
  3. mchid
    2018-10-24T23:36:41+08:002018-10-24T23:36:41+08:00

    您应该能够使用以下命令进行安装,以指定您首先需要的特定版本:

    sudo apt update
    sudo apt upgrade
    sudo apt install --reinstall libncurses5-dev=6.1-1ubuntu1.18.04 libtinfo-dev=6.1-1ubuntu1.18.04 libssl-dev=1.1.0g-2ubuntu4.1 
    

    然后,运行包含重新安装的原始安装命令,并发布任何错误:

    sudo apt install --reinstall autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm5 libgdbm-dev
    
    • 0
  4. Nat Azodnem
    2018-10-24T23:37:43+08:002018-10-24T23:37:43+08:00

    我曾经在GRASS 包上遇到过类似的问题。以下是我解决此问题的方法:

    1. Install aptitude,一个包安装程序。sudo apt install aptitude
    2. sudo aptitude install autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm5 libgdbm-dev
    3. 现在 aptitude 应该询问您是否要安装带有选项 a、选项 b 等的软件包。您可能希望通过说“不”来完成每个可能的选择,直到您到达最后,重新运行命令并做出“受过教育”的选择。
    • 0
  5. kishore
    2020-08-15T12:37:23+08:002020-08-15T12:37:23+08:00

    还有另一个相当难以弄清楚的问题。我的问题是系统时钟比实际日期晚了几天。一旦我修复它,我就可以安装 libncurses5-dev

    检查我的终端输出

    # apt-get install libncurses-dev
    <snip>
    The following packages have unmet dependencies:
     libncurses5-dev : Depends: libtinfo5 (= 6.1-1ubuntu1) but 6.1-1ubuntu1.18.04 is to be installed
                       Depends: libncurses5 (= 6.1-1ubuntu1) but 6.1-1ubuntu1.18.04 is to be installed
                       Depends: libtinfo-dev (= 6.1-1ubuntu1) but it is not going to be installed
    E: Unable to correct problems, you have held broken packages.
    # apt-get update
    <snip>
    Reading package lists... Done
    E: Release file for http://security.ubuntu.com/ubuntu/dists/bionic-security/InRelease is not valid yet (invalid for another 10d 22h 52min 0s). Updates for this repository will not be applied.
    E: Release file for http://us.archive.ubuntu.com/ubuntu/dists/bionic-updates/InRelease is not valid yet (invalid for another 10d 22h 53min 14s). Updates for this repository will not be applied.
    E: Release file for http://us.archive.ubuntu.com/ubuntu/dists/bionic-backports/InRelease is not valid yet (invalid for another 10d 22h 54min 51s). Updates for this repository will not be applied.
    # date
    Mon Aug  3 17:03:26 EDT 2020
    # apt-get install ntp
    # systemctl status ntp
    # date
    Fri Aug 14 16:26:10 EDT 2020
    # apt-get install libncurses-dev
    <snip>
    The following NEW packages will be installed:
      libc-dev-bin libc6-dev libncurses5-dev libtinfo-dev linux-libc-dev manpages-dev
    <snip>
    Setting up libncurses5-dev:amd64 (6.1-1ubuntu1.18.04) ...
    
    • 0
  6. Ebe
    2020-09-26T11:23:29+08:002020-09-26T11:23:29+08:00

    这对我有用:

    第 1 步:打开终端(按Ctrl+ Alt+ T)。

    第 2 步:输入:software-properties-gtk

    第 3 步:不要查找源文件,因为至少在我的情况下,它不在答案中其他地方提到的位置

    第 4 步:将显示软件更新面板。

    到达那里后,只需允许所有来源都能够更新。我相信有三个选项 - 全部勾选!

    • 0

相关问题

  • 如何从命令行仅安装安全更新?关于如何管理更新的一些提示

  • 如何从命令行判断机器是否需要重新启动?

  • 有没有办法重置所有包/源并从头开始?

  • 如何回滚到 PHP 5.2?

  • 包管理器之间有什么区别?

Sidebar

Stats

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

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

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

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve