安装软件遇到的两个问题请教

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
回复
上网摘星星
帖子: 41
注册时间: 2012-07-10 20:47

安装软件遇到的两个问题请教

#1

帖子 上网摘星星 » 2018-01-18 18:52

百度没有找到解决办法,所以又来求助了。
ubuntu 17.04

状况一:
(一)
root@aaaa:/# sudo apt-get update
命中:1 http://ppa.launchpad.net/team-xbmc/xbmc-nightly/ubuntu zesty InRelease
忽略:2 http://dl.google.com/linux/chrome/deb stable InRelease
命中:3 http://dl.google.com/linux/chrome/deb stable Release
忽略:5 http://cn.archive.ubuntu.com/ubuntu zesty InRelease
错误:6 http://cn.archive.ubuntu.com/ubuntu zesty Release
连接失败 [IP: 110.52.196.232 80]
正在读取软件包列表... 完成
E: 仓库 “http://cn.archive.ubuntu.com/ubuntu zesty Release” 不再含有 Release 文件。
N: 无法安全地用该源进行更新,所以默认禁用该源。
N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。

(二)
root@aaaa:/# apt-get install mtr
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
下列软件包是自动安装的并且现在不需要了:
attr libboost-random1.62.0 libcephfs1 python-crypto python-dnspython
python-ldb python-samba python-tdb samba-dsdb-modules samba-vfs-modules
tdb-tools
使用'apt autoremove'来卸载它(它们)。
下列软件包将被【卸载】:
mtr-tiny
下列【新】软件包将被安装:
mtr
升级了 0 个软件包,新安装了 1 个软件包,要卸载 1 个软件包,有 5 个软件包未被升级。
需要下载 60.1 kB 的归档。
解压缩后会消耗 51.2 kB 的额外空间。
您希望继续执行吗? [Y/n] y
错误:1 http://cn.archive.ubuntu.com/ubuntu zesty/universe amd64 mtr amd64 0.87-1
连接失败 [IP: 110.52.196.233 80]
E: 无法下载 http://cn.archive.ubuntu.com/ubuntu/poo ... _amd64.deb 连接失败 [IP: 110.52.196.233 80]
E: 有几个软件包无法下载,要不运行 apt-get update 或者加上 --fix-missing 的选项再试试?

(三)
root@aaaa:/# cat /etc/apt/sources.list
# deb cdrom:[Ubuntu 17.04 _Zesty Zapus_ - Release amd64 (20170412)]/ zesty main restricted

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.


deb http://cn.archive.ubuntu.com/ubuntu/ zesty main restricted
#deb http://cn.archive.ubuntu.com/ubuntu/ zesty main restricted
# deb-src http://cn.archive.ubuntu.com/ubuntu/ zesty main restricted

## Major bug fix updates produced after the final release of the
## distribution.
# deb-src http://cn.archive.ubuntu.com/ubuntu/ zesty-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.

deb http://cn.archive.ubuntu.com/ubuntu/ zesty universe
# deb-src http://cn.archive.ubuntu.com/ubuntu/ zesty universe
# deb-src http://cn.archive.ubuntu.com/ubuntu/ zesty-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.

deb http://cn.archive.ubuntu.com/ubuntu/ zesty multiverse
# deb-src http://cn.archive.ubuntu.com/ubuntu/ zesty multiverse
# deb-src http://cn.archive.ubuntu.com/ubuntu/ zesty-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
# deb-src http://cn.archive.ubuntu.com/ubuntu/ zesty-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu zesty partner
# deb-src http://archive.canonical.com/ubuntu zesty partner

# deb-src http://security.ubuntu.com/ubuntu zesty-security main restricted
# deb-src http://security.ubuntu.com/ubuntu zesty-security universe
# deb-src http://security.ubuntu.com/ubuntu zesty-security multiverse

问题一:请问为何会连不上源呢?该如何连上源?

状况二:

(一)
root@aaaa:/# apt-get install samba
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
有一些软件包无法被安装。如果您用的是 unstable 发行版,这也许是
因为系统无法达到您要求的状态造成的。该版本中可能会有一些您需要的软件
包尚未被创建或是它们已被从新到(Incoming)目录移出。
下列信息可能会对解决问题有所帮助:

下列软件包有未满足的依赖关系:
samba : 依赖: samba-common-bin (= 2:4.5.4+dfsg-1ubuntu2) 但是它将不会被安装
依赖: libwbclient0 (= 2:4.5.4+dfsg-1ubuntu2) 但是 2:4.5.8+dfsg-0ubuntu0.17.04.3 正要被安装
依赖: samba-libs (= 2:4.5.4+dfsg-1ubuntu2) 但是 2:4.5.8+dfsg-0ubuntu0.17.04.3 正要被安装
E: 无法修正错误,因为您要求某些软件包保持现状,就是它们破坏了软件包间的依赖关系。

(二)
尝试卸载libwbclient0,结果让我卸载一大堆软件包,吓坏我了

root@aaaa:/# apt-get remove libwbclient0
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
下列软件包是自动安装的并且现在不需要了:
attr docbook-xml docbook-xsl fonts-dejavu fonts-dejavu-extra icoutils
kate-data katepart kde-runtime-data kde-style-breeze kde-style-breeze-qt4
kdelibs-bin kdelibs5-data kdelibs5-plugins kdoctools
kodi-peripheral-joystick kwayland-data kwayland-integration
libadplug-2.2.1-0v5 libattica0.4 libaudiofile1 libbinio1v5
libboost-random1.62.0 libcdio-cdda1 libcdio-paranoia1 libcec4 libcephfs1
libcrossguid0 libdirectfb-1.2-9 libdlrestrictions1 libenca0 libfam0 libgif7
libgpgme++2v5 libid3tag0 libiso9660-8 libkactivities6 libkatepartinterfaces4
libkcmutils4 libkde3support4 libkdeclarative5 libkdecore5 libkdesu5
libkdeui5 libkdewebkit5 libkdnssd4 libkemoticons4 libkf5archive5
libkf5auth-data libkf5auth5 libkf5codecs-data libkf5codecs5 libkf5config-bin
libkf5config-data libkf5configcore5 libkf5configgui5
libkf5configwidgets-data libkf5configwidgets5 libkf5coreaddons-data
libkf5coreaddons5 libkf5guiaddons5 libkf5i18n-data libkf5i18n5
libkf5iconthemes-bin libkf5iconthemes-data libkf5iconthemes5 libkf5idletime5
libkf5itemviews-data libkf5itemviews5 libkf5style5 libkf5waylandclient5
libkf5widgetsaddons-data libkf5widgetsaddons5 libkf5windowsystem-data
libkf5windowsystem5 libkfile4 libkhtml5 libkio5 libkjsapi4 libkjsembed4
libkmediaplayer4 libknewstuff3-4 libknotifyconfig4 libkntlm4 libkparts4
libkpty4 libkrosscore4 libktexteditor4 libkxmlrpcclient4 libldb1
libmicrohttpd10 libmikmod3 libmpdclient2 libnfs8 libnl-route-3-200
libntrack-qt4-1 libntrack0 libp8-platform2 libpcrecpp0v5 libphonon4
libplasma3 libpolkit-qt-1-1 libpolkit-qt5-1-1 libpython2.7 libqca2
libqca2-plugins libqt4-designer libqt4-opengl libqt4-qt3support libqt4-svg
libqt5script5 libqt5x11extras5 libqtwebkit4 libroar2 libsdl1.2debian
libshairplay0 libsidplayfp4 libsolid4 libstreamanalyzer0v5 libstreams0v5
libtalloc2 libtevent0 libthreadweaver4 libupnp6 libvorbisidec1 libxml2-utils
libzzip-0-13 mplayer-skins ntrack-module-libnl-0 oxygen-icon-theme phonon
phonon-backend-gstreamer phonon-backend-gstreamer-common
plasma-scriptengine-javascript python-bluez python-crypto python-dnspython
python-ldb python-simplejson python-talloc python-tdb sgml-data tdb-tools
使用'apt autoremove'来卸载它(它们)。
下列软件包将被【卸载】:
gvfs-backends kde-runtime kmplayer kodi kodi-bin libsmbclient libwbclient0
mpd mplayer mplayer-gui python-samba samba-dsdb-modules samba-libs
samba-vfs-modules
升级了 0 个软件包,新安装了 0 个软件包,要卸载 14 个软件包,有 3 个软件包未被升级。
解压缩后将会空出 141 MB 的空间。
您希望继续执行吗? [Y/n] n

问题二:请问我该如何在不影响其他软件的情况下把samba装上。。。
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: 安装软件遇到的两个问题请教

#2

帖子 poloshiao » 2018-01-18 19:22

E: 仓库 “http://cn.archive.ubuntu.com/ubuntu zesty Release” 不再含有 Release 文件。
... 以下略
1. http://cn.archive.ubuntu.com/ubuntu/dists/
已經沒有 zesty 子目錄

2. 參見
http://forum.ubuntu.com.cn/viewtopic.ph ... 4#p3200824
上网摘星星
帖子: 41
注册时间: 2012-07-10 20:47

Re: 安装软件遇到的两个问题请教

#3

帖子 上网摘星星 » 2018-01-19 23:22

多谢多谢,搞定!
上网摘星星
帖子: 41
注册时间: 2012-07-10 20:47

Re: 安装软件遇到的两个问题请教

#4

帖子 上网摘星星 » 2018-01-20 22:22

poloshiao 写了:......
抱歉,还要请教一下。
试图安装MPD时,提示信息如下:

代码: 全选

root@aaaa:/home/aaaa# apt-get install mpd
正在读取软件包列表... 完成
正在分析软件包的依赖关系树       
正在读取状态信息... 完成       
下列软件包是自动安装的并且现在不需要了:
  kodi-peripheral-joystick libmicrohttpd10 libnih-dbus1 libshairplay0
使用'apt autoremove'来卸载它(它们)。
建议安装:
  icecast2
下列【新】软件包将被安装:
  mpd
升级了 0 个软件包,新安装了 1 个软件包,要卸载 0 个软件包,有 0 个软件包未被升级。
需要下载 0 B/418 kB 的归档。
解压缩后会消耗 1,384 kB 的额外空间。
正在选中未选择的软件包 mpd。
(正在读取数据库 ... 系统当前共安装有 210563 个文件和目录。)
正准备解包 .../mpd_0.20.9-2_amd64.deb  ...
正在解包 mpd (0.20.9-2) ...
正在设置 mpd (0.20.9-2) ...
Job for mpd.service failed because the control process exited with error code.
See "systemctl  status mpd.service" and "journalctl  -xe" for details.
invoke-rc.d: initscript mpd, action "restart" failed.
● mpd.service - Music Player Daemon
   Loaded: loaded (/lib/systemd/system/mpd.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sat 2018-01-20 22:21:14 CST; 39ms ago
     Docs: man:mpd(1)
           man:mpd.conf(5)
           file:///usr/share/doc/mpd/user-manual.html
  Process: 15693 ExecStart=/usr/bin/mpd --no-daemon $MPDCONF (code=exited, status=1/FAILURE)
 Main PID: 15693 (code=exited, status=1/FAILURE)

1月 20 22:21:11 aaaa systemd[1]: Starting Music Player Daemon...
1月 20 22:21:14 aaaa mpd[15693]: exception: No configuration file found
1月 20 22:21:14 aaaa systemd[1]: mpd.service: Main process exited, code=exited, status=1/FAILURE
1月 20 22:21:14 aaaa systemd[1]: Failed to start Music Player Daemon.
1月 20 22:21:14 aaaa systemd[1]: mpd.service: Unit entered failed state.
1月 20 22:21:14 aaaa systemd[1]: mpd.service: Failed with result 'exit-code'.
dpkg: 处理软件包 mpd (--configure)时出错:
 子进程 已安装 post-installation 脚本 返回错误状态 1
正在处理用于 ureadahead (0.100.0-20) 的触发器 ...
正在处理用于 doc-base (0.10.7) 的触发器 ...
Processing 1 added doc-base file...
正在处理用于 systemd (234-2ubuntu12) 的触发器 ...
正在处理用于 man-db (2.7.6.1-2) 的触发器 ...
在处理时有错误发生:
 mpd
E: Sub-process /usr/bin/dpkg returned an error code (1)
请问该如何处理?
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: 安装软件遇到的两个问题请教

#5

帖子 poloshiao » 2018-01-21 11:39

Active: failed (Result: exit-code)
https://askubuntu.com/questions/759533/ ... mpd/762380
changing $MPDCONF to /etc/mpd.conf
回复