当前位置: > Linux发行版 > Debian >

如何在Debian下安装Webmin

时间:2016-05-27 02:55来源:linux.it.net.cn 作者:IT

Webmin 是广受欢迎的免费面板,由于习惯了此面板,所以换到 Debian 7 系统后,还是打算安装一下。在过程中出了不少错误,最终还是顺利安装完成。
下面记录一下出错信息及解决办法。
按照官方网站是安装教程,下载 deb 包然后使用 dpkg 命令安装,会有几个依赖包无法安装,从而导致出错。

 

方案一(会出错,无法安装)
下载最新版 deb 包:
http://www.webmin.com/download/deb/webmin-current.deb
安装:

dpkg --install webmin-current.deb

出错信息如下:

root@v5:~# dpkg --install webmin-current.deb
Selecting previously unselected package webmin.
(Reading database ... 22186 files and directories currently installed.)
Unpacking webmin (from webmin-current.deb) ...
dpkg: dependency problems prevent configuration of webmin:
 webmin depends on libnet-ssleay-perl; however:
  Package libnet-ssleay-perl is not installed.
 webmin depends on libauthen-pam-perl; however:
  Package libauthen-pam-perl is not installed.
 webmin depends on libio-pty-perl; however:
  Package libio-pty-perl is not installed.
 webmin depends on apt-show-versions; however:
  Package apt-show-versions is not installed.

dpkg: error processing webmin (--install):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 webmin

官网给出的方案是,手动运行以下命令,但依然会出错。如下:

root@v5:~# apt-get install perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl apt-show-versions python
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libpam-runtime is already the newest version.
perl is already the newest version.
python is already the newest version.
openssl is already the newest version.
openssl set to manually installed.
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 apt-show-versions : Depends: libapt-pkg-perl (>= 0.1.21) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

不死心,运行 apt-get -f install apt-show-versions 强制安装,依旧出错。

方案二(OK)
编辑 /etc/apt/sources.list 文件,在最末尾添加以下内容:

vi /etc/apt/sources.list
deb http://download.webmin.com/download/repository sarge contrib
deb http://webmin.mirror.somersettechsolutions.co.uk/repository sarge contrib

安装 GPG key

cd /root
wget http://www.webmin.com/jcameron-key.asc
apt-key add jcameron-key.asc

再执行

apt-get update
apt-get install webmin

所有的依赖会自动解决。
搞定收工。

注:此法同样适用于 Ubuntu 下。

参考资料:
http://www.webmin.com/deb.html




(责任编辑:IT)
------分隔线----------------------------