Debian

在 VPS 上設置 webmin 缺少包和儲存庫

  • December 29, 2018

我只是想將 webmin 設置為新 VPS 上的第一件事,我熟悉 Ubuntu(它是我的主要工作機器)。

這就是 VPS 上的內容

Description:    Debian GNU/Linux 8.5 (jessie)
Release:    8.5
Codename:    jessie

所以我按照說明下載並安裝 virtualmin:

wget http://software.virtualmin.com/gpl/scripts/install.sh
sudo /bin/sh install.sh

它開始很好,但最終失敗了:

$$ INFO $$在 /root/virtualmin-install.log 中開始安裝日誌

▣□□ Phase 1 of 3: Setup
Installing extra dependencies for Debian 8                              [  ✔  ]
Downloading apt.gpg                                                     [  ✔  ]
Adding GPG key for PHP7 packages                                        [  ✔  ]
Downloading RPM-GPG-KEY-virtualmin-6                                    [  ✔  ]
Downloading RPM-GPG-KEY-webmin                                          [  ✔  ]
Installing Virtualmin 6 key                                             [  ✔  ]
Installing Webmin key                                                   [  ✔  ]
Updating apt metadata                                                   [  ✔  ]
Downloading repository metadata                                         [  ✔  ]
Disabling cdrom: repositories                                           [  ✔  ]
Cleaning out old metadata                                               [  ✔  ]

▣▣□ Phase 2 of 3: Installation
Installing Webmin                                                       [ERROR] Failed with error: 100
[  ✘  ]

[ERROR] Something went wrong. Exiting.
[ERROR] The last few log entries were:
Reading state information...
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:
webmin : Depends: libauthen-pam-perl but it is not installable
         Depends: libio-pty-perl but it is not installable
         Depends: apt-show-versions but it is not installable
E: Unable to correct problems, you have held broken packages.

這是sources.list的樣子

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

# jessie-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://ftp.debian.org/debian/ jessie-updates main contrib
#deb-src http://ftp.debian.org/debian/ jessie-updates main contrib
deb http://software.virtualmin.com/vm/6/gpl/apt virtualmin-jessie main
deb http://software.virtualmin.com/vm/6/gpl/apt virtualmin-universal main

然後我嘗試安裝一個失去的包(並為每個失去的包獲得相同的響應):

sudo apt install libauthen-pam-perl
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package libauthen-pam-perl 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 'libauthen-pam-perl' has no installation candidate

因此,我嘗試添加包含apt-show-versions(缺少的包之一)的儲存庫:

sudo add-apt-repository …

但是該命令(add-apt-repository)不存在。所以我嘗試載入software-properties-common,也找不到那個包。

我怎樣才能擺脫這種精神錯亂,把東西裝滿?

這就是我得到的sudo apt update

Hit http://software.virtualmin.com virtualmin-jessie InRelease                                                   
Hit http://software.virtualmin.com virtualmin-universal InRelease                                                
Hit http://packages.sury.org jessie InRelease                                                                    
Hit http://security.debian.org jessie/updates InRelease                 
Hit http://software.virtualmin.com virtualmin-jessie/main amd64 Packages
Hit http://packages.sury.org jessie/main amd64 Packages                                    
Get:1 http://packages.sury.org jessie/main Translation-en_GB [169 B]                       
Get:2 http://packages.sury.org jessie/main Translation-en [169 B]                         
Hit http://security.debian.org jessie/updates/main Sources                         
Hit http://security.debian.org jessie/updates/contrib Sources                                      
Hit http://security.debian.org jessie/updates/main amd64 Packages                                  
Get:3 http://packages.sury.org jessie/main Translation-en_GB [169 B]                               
Hit http://security.debian.org jessie/updates/contrib amd64 Packages                                                    
Hit http://security.debian.org jessie/updates/contrib Translation-en                                   
Hit http://security.debian.org jessie/updates/main Translation-en                                      
Get:4 http://packages.sury.org jessie/main Translation-en [169 B]                
Hit http://software.virtualmin.com virtualmin-universal/main amd64 Packages                         
Get:5 http://packages.sury.org jessie/main Translation-en_GB [169 B]
Get:6 http://packages.sury.org jessie/main Translation-en [169 B]                  
Get:7 http://packages.sury.org jessie/main Translation-en_GB [169 B]
Get:8 http://packages.sury.org jessie/main Translation-en [169 B]                  
Get:9 http://packages.sury.org jessie/main Translation-en_GB [169 B]            
Ign http://packages.sury.org jessie/main Translation-en_GB                             
Get:10 http://packages.sury.org jessie/main Translation-en [169 B]
Ign http://packages.sury.org jessie/main Translation-en        
Ign http://software.virtualmin.com virtualmin-jessie/main Translation-en_GB
Ign http://software.virtualmin.com virtualmin-jessie/main Translation-en
Ign http://software.virtualmin.com virtualmin-universal/main Translation-en_GB
Ign http://software.virtualmin.com virtualmin-universal/main Translation-en

您應該將以下行添加到您的/etc/apt/sources.list:

deb http://ftp.debian.org/debian jessie main contrib

然後sudo apt update執行你的腳本。

在執行安裝腳本時,libauthen-pam-perl將自動從儲存庫安裝包(以及缺少的依賴項)。main

引用自:https://unix.stackexchange.com/questions/491440