使用 sudo apt-get install openssh-server 命令后
提示:
Package openssh-server is not available, but is referred to by another
package. This may mean that the package is missing, has been obsoleted,
or is only available from another source.
E: Package openssh-server has no installation candidate.
使用 sudo /etc/init.d/ssh start 或者restart 提示:
/ect/init.d/ssh:command not found
表示不存在,,那为什么还装不了!
先用apt-get install -f 清理一下软件包,再试试
apt-get install -f 后
提示: 0 upgraded,0 newly installed,0 to remove and 0 not upgraded
再去安装,还是那个错误
最后在一个老外的网站上看到如下解决方案:
Thank you everyone. I did the "sudo apt-get update" (took a while), and then the "sudo apt-get install openssh-server" worked!
Basic apt tutorial.
Apt looks at your sources.list file to find the download servers for all software to install. Package managers such as synaptic also look at your sources.list file. This file is located at /etc/apt/sources.list. Apt is a very useful and powerful tool that is very easy to use. Synaptic is a GUI interface available in the gnome desktop environment to control apt. Adversely Kpackage does the same thing in the KDE desktop environment.
If you want to search for a package you can use apt-cache
Code:
apt-cache searchTo install a package use apt-get install
Code:
apt-get installTo Remove a package use apt-get remove
Code:
apt-get removeWhen removing software in some files such as configurations are not always removed. To completely remove a package use the purge switch
Code:
apt-get remove --purgeTo fix broken packages use the force option with install
Code:
apt-get -f install*** Note there was not a package name specified here. This is intentional.
To perform a system update use apt-get upgrade
Code:
apt-get upgradeTo perform a distribution upgrade use apt-get dist-upgrade
Code:
apt-get dist-upgradeTo re-load your sources.list file use apt-get update
Code:
apt-get update
using the above information you should be able to do almost anything related to package management on your system.
提示:
Package openssh-server is not available, but is referred to by another
package. This may mean that the package is missing, has been obsoleted,
or is only available from another source.
E: Package openssh-server has no installation candidate.
使用 sudo /etc/init.d/ssh start 或者restart 提示:
/ect/init.d/ssh:command not found
表示不存在,,那为什么还装不了!
先用apt-get install -f 清理一下软件包,再试试
apt-get install -f 后
提示: 0 upgraded,0 newly installed,0 to remove and 0 not upgraded
再去安装,还是那个错误
最后在一个老外的网站上看到如下解决方案:
Thank you everyone. I did the "sudo apt-get update" (took a while), and then the "sudo apt-get install openssh-server" worked!
Basic apt tutorial.
Apt looks at your sources.list file to find the download servers for all software to install. Package managers such as synaptic also look at your sources.list file. This file is located at /etc/apt/sources.list. Apt is a very useful and powerful tool that is very easy to use. Synaptic is a GUI interface available in the gnome desktop environment to control apt. Adversely Kpackage does the same thing in the KDE desktop environment.
If you want to search for a package you can use apt-cache
Code:
apt-cache search
Code:
apt-get install
Code:
apt-get remove
Code:
apt-get remove --purge
Code:
apt-get -f install*** Note there was not a package name specified here. This is intentional.
To perform a system update use apt-get upgrade
Code:
apt-get upgradeTo perform a distribution upgrade use apt-get dist-upgrade
Code:
apt-get dist-upgradeTo re-load your sources.list file use apt-get update
Code:
apt-get update
using the above information you should be able to do almost anything related to package management on your system.
作者:jackxiang@向东博客 专注WEB应用 构架之美 --- 构架之美,在于尽态极妍 | 应用之美,在于药到病除
地址:https://jackxiang.com/post/3256/
版权所有。转载时必须以链接形式注明作者和原始出处及本声明!
评论列表