【ubuntu】1404 安装ssh-server时出现错误

来源:互联网 发布:第一会软件 编辑:程序博客网 时间:2024/06/10 18:18

刚安装完Ubuntu14.04 后, 想先安装ssh, 但是出现了以下错误

wt@wt-vm:~$ sudo apt-get install openssh-serverReading package lists... DoneBuilding dependency tree       Reading state information... DoneSome packages could not be installed. This may mean that you haverequested an impossible situation or if you are using the unstabledistribution that some required packages have not yet been createdor been moved out of Incoming.The following information may help to resolve the situation:The following packages have unmet dependencies: libcogl15 : Depends: libegl1-mesa-drivers openssh-server : Depends: openssh-client (= 1:6.6p1-2ubuntu1)E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

解决办法如下:

1、 先安装openssh-server 依指定定版本的 openssh-client

wt@wt-vm:~$ sudo apt-get install openssh-client=1:6.6p1-2ubuntu1Reading package lists... DoneBuilding dependency tree       Reading state information... DoneSuggested packages:  libpam-ssh keychain monkeysphereThe following packages will be DOWNGRADED:  openssh-client0 upgraded, 0 newly installed, 1 downgraded, 0 to remove and 0 not upgraded.Need to get 566 kB of archives.After this operation, 0 B of additional disk space will be used.Do you want to continue? [Y/n] yGet:1 http://cn.archive.ubuntu.com/ubuntu/ trusty/main openssh-client amd64 1:6.6p1-2ubuntu1 [566 kB]Fetched 566 kB in 0s (780 kB/s)        dpkg: warning: downgrading openssh-client from 1:6.6p1-2ubuntu2.7 to 1:6.6p1-2ubuntu1(Reading database ... 167741 files and directories currently installed.)Preparing to unpack .../openssh-client_1%3a6.6p1-2ubuntu1_amd64.deb ...Unpacking openssh-client (1:6.6p1-2ubuntu1) over (1:6.6p1-2ubuntu2.7) ...Processing triggers for man-db (2.6.7.1-1ubuntu1) ...Setting up openssh-client (1:6.6p1-2ubuntu1) ...

2、在重新安装openssh-server

wt@wt-vm:~$ sudo apt-get install openssh-serverReading package lists... DoneBuilding dependency tree       Reading state information... DoneThe following extra packages will be installed:  libck-connector0 ncurses-term openssh-sftp-server ssh-import-idSuggested packages:  rssh molly-guard monkeysphereThe following NEW packages will be installed:  libck-connector0 ncurses-term openssh-server openssh-sftp-server  ssh-import-id0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.Need to get 616 kB of archives.After this operation, 3,420 kB of additional disk space will be used.Do you want to continue? [Y/n] yGet:1 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libck-connector0 amd64 0.4.5-3.1ubuntu2 [10.5 kB]Get:2 http://cn.archive.ubuntu.com/ubuntu/ trusty/main ncurses-term all 5.9+20140118-1ubuntu1 [243 kB]Get:3 http://cn.archive.ubuntu.com/ubuntu/ trusty/main openssh-sftp-server amd64 1:6.6p1-2ubuntu1 [34.1 kB]Get:4 http://cn.archive.ubuntu.com/ubuntu/ trusty/main openssh-server amd64 1:6.6p1-2ubuntu1 [319 kB]Get:5 http://cn.archive.ubuntu.com/ubuntu/ trusty/main ssh-import-id all 3.21-0ubuntu1 [9,624 B]Fetched 616 kB in 0s (746 kB/s)            Preconfiguring packages ...Selecting previously unselected package libck-connector0:amd64.(Reading database ... 167741 files and directories currently installed.)Preparing to unpack .../libck-connector0_0.4.5-3.1ubuntu2_amd64.deb ...Unpacking libck-connector0:amd64 (0.4.5-3.1ubuntu2) ...Selecting previously unselected package ncurses-term.Preparing to unpack .../ncurses-term_5.9+20140118-1ubuntu1_all.deb ...Unpacking ncurses-term (5.9+20140118-1ubuntu1) ...Selecting previously unselected package openssh-sftp-server.Preparing to unpack .../openssh-sftp-server_1%3a6.6p1-2ubuntu1_amd64.deb ...Unpacking openssh-sftp-server (1:6.6p1-2ubuntu1) ...Selecting previously unselected package openssh-server.Preparing to unpack .../openssh-server_1%3a6.6p1-2ubuntu1_amd64.deb ...Unpacking openssh-server (1:6.6p1-2ubuntu1) ...Selecting previously unselected package ssh-import-id.Preparing to unpack .../ssh-import-id_3.21-0ubuntu1_all.deb ...Unpacking ssh-import-id (3.21-0ubuntu1) ...Processing triggers for man-db (2.6.7.1-1ubuntu1) ...Processing triggers for ureadahead (0.100.0-16) ...ureadahead will be reprofiled on next rebootProcessing triggers for ufw (0.34~rc-0ubuntu2) ...Setting up libck-connector0:amd64 (0.4.5-3.1ubuntu2) ...Setting up ncurses-term (5.9+20140118-1ubuntu1) ...Setting up openssh-sftp-server (1:6.6p1-2ubuntu1) ...Setting up openssh-server (1:6.6p1-2ubuntu1) ...Creating SSH2 RSA key; this may take some time ...Creating SSH2 DSA key; this may take some time ...Creating SSH2 ECDSA key; this may take some time ...Creating SSH2 ED25519 key; this may take some time ...ssh start/running, process 4429Setting up ssh-import-id (3.21-0ubuntu1) ...Processing triggers for libc-bin (2.19-0ubuntu6.9) ...Processing triggers for ureadahead (0.100.0-16) ...Processing triggers for ufw (0.34~rc-0ubuntu2) ...



原创粉丝点击