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
    • 最新
    • 标签
主页 / server / 问题 / 1018278
Accepted
James B. Byrne
James B. Byrne
Asked: 2020-05-23 11:14:46 +0800 CST2020-05-23 11:14:46 +0800 CST 2020-05-23 11:14:46 +0800 CST

无法在 debian 10.4 上安装 sshd (openssh-server)

  • 772

这是 Debian-10.4 的全新安装。sources.list 文件如下:

# deb cdrom:[Debian GNU/Linux 10.4.0 Buster - Official amd64 DVD Binary-1 20200 0509-10:26]/ buster contrib main

deb http://security.debian.org/debian-security buster/updates main contrib
deb-src http://security.debian.org/debian-security buster/updates main contrib

# buster-updates, previously known as 'volatile'
# A network mirror was not selected during install.  The following entries
# are provided as examples, but you should amend them as appropriate
# for your mirror of choice.
#
deb http://deb.debian.org/debian/ buster-updates main contrib
deb-src http://deb.debian.org/debian/ buster-updates main contrib

当我尝试安装 sshd (openssh-serverr) 我得到这个:

[root@smb4-a ~]# apt install -f openssh-server
Reading package lists... Done
Building dependency tree       
Reading state information... Done
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:
 openssh-server : Depends: openssh-client (= 1:7.9p1-10+deb10u1) but 1:7.9p1-10+deb10u2 is to be installed
                  Depends: openssh-sftp-server but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

我什至不会去想象什么样的发行版不提供作为基本安装的一部分的安全远程访问。无论 Debian 的原因是什么,我都需要这样。问题似乎是这样的:

 openssh-server : Depends: openssh-client (= 1:7.9p1-10+deb10u1) but 1:7.9p1-10+deb10u2 is to be installed

如何强制安装损坏的依赖项?

更多信息:

[root@smb4-a ~]# apt-get update
Get:1 http://deb.debian.org/debian buster-updates InRelease [49.3 kB]
Hit:2 http://security.debian.org/debian-security buster/updates InRelease
Get:3 http://deb.debian.org/debian buster-updates/main Sources [3,088 B]
Get:4 http://deb.debian.org/debian buster-updates/main amd64 Packages [7,380 B]
Get:5 http://deb.debian.org/debian buster-updates/main Translation-en [5,166 B]
Fetched 64.9 kB in 0s (358 kB/s)           
Reading package lists... Done
[root@smb4-a ~]# apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

更多信息:

# apt policy openssh-*
openssh-sftp-server:
  Installed: (none)
  Candidate: 1:7.9p1-10+deb10u1
  Version table:
     1:7.9p1-10+deb10u1 500
        500 http://security.debian.org/debian-security buster/updates/main amd64 Packages
openssh-tests:
  Installed: (none)
  Candidate: 1:7.9p1-10+deb10u1
  Version table:
     1:7.9p1-10+deb10u1 500
        500 http://security.debian.org/debian-security buster/updates/main amd64 Packages
openssh-server:
  Installed: (none)
  Candidate: 1:7.9p1-10+deb10u1
  Version table:
     1:7.9p1-10+deb10u1 500
        500 http://security.debian.org/debian-security buster/updates/main amd64 Packages
openssh-client:
  Installed: 1:7.9p1-10+deb10u2
  Candidate: 1:7.9p1-10+deb10u2
  Version table:
 *** 1:7.9p1-10+deb10u2 100
        100 /var/lib/dpkg/status
     1:7.9p1-10+deb10u1 500
        500 http://security.debian.org/debian-security buster/updates/main amd64 Packages
debian installation dependencies ssh apt
  • 2 2 个回答
  • 9123 Views

2 个回答

  • Voted
  1. Best Answer
    Lacek
    2020-05-26T06:00:39+08:002020-05-26T06:00:39+08:00

    似乎在安装过程中,您对“使用网络镜像?”的问题回答了“否”,因此您的系统配置为没有镜像(或者您在安装过程中可能没有网络连接)。顺便说一句,这由您的 sources.list 指示:

    # A network mirror was not selected during install.  The following entries
    # are provided as examples, but you should amend them as appropriate
    # for your mirror of choice.
    

    所以现在你有一个不完整的sources.list,其中包含更新和安全修复,但不包含基本系统。我不知道 DVD 行是如何从您的 中注释掉的sources.list,因为如果没有网络镜像,安装程序不会将其删除。

    您必须配置镜像才能正确安装软件包。将此行添加到您的sources.list:

    deb http://ftp.us.debian.org/debian/ buster main contrib non-free
    

    并运行apt update。之后,您可以安装openssh-server.

    您可能希望将镜像切换到离您更近的位置,这可以通过更改usURL 的一部分以对应于您的国家或提供不同的镜像来完成。镜像站点列表可在此处获得。

    或者,您可以安装该netselect-apt软件包,它将搜索您附近最快的镜像。

    附带说明:Debian 确实提供了一个安全的远程 shell,您所要做的就是在安装过程中在“软件选择”页面上勾选“SSH 服务器”(为什么默认情况下不选择它,我无法理解,但仍然如此)。

    • 2
  2. Ipor Sircer
    2020-05-24T00:49:18+08:002020-05-24T00:49:18+08:00
    echo "deb http://deb.debian.org/debian/ buster-updates main contrib" >> /etc/apt/sources.list
    
    • -1

相关问题

  • 关闭 FTP

  • 如何在同一台电脑上从 putty 连接 debian vmware

  • debian- 文件到包的映射

  • Debian Ubuntu 网络管理器错误 [关闭]

  • 为本地网络中的名称解析添加自定义 dns 条目

Sidebar

Stats

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

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

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

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve