er6p无法通过apt安装软件

root@ubnt:/home/ubnt# apt install python-pip
Reading package lists… Done
Building dependency tree
Reading state information… Done
python-pip is already the newest version (9.0.1-2+deb9u1).
You might want to run ‘apt --fix-broken install’ to correct these.
The following packages have unmet dependencies:
dpkg-dev : Depends: xz-utils but it is not going to be installed
E: Unmet dependencies. Try ‘apt --fix-broken install’ with no packages (or specify a solution).

root@ubnt:/home/ubnt# cat /etc/apt/sources.list.d/stretch.list
deb http://ftp2.cn.debian.org/debian/ stretch main contrib non-free # stretch #

请教各位,请问是什么问题?谢谢!


# apt update
# apt install -f
然后再试试

谢谢。但是它还是显示有问题。看来是xz同时在两个包出现了。
ubnt@ubnt:~$ sudo apt update
Ign:1 http://mirrors.tuna.tsinghua.edu.cn/debian stretch InRelease
Hit:2 http://mirrors.tuna.tsinghua.edu.cn/debian stretch Release
Reading package lists… Done
Building dependency tree
Reading state information… Done
2 packages can be upgraded. Run ‘apt list --upgradable’ to see them.
ubnt@ubnt:~$ sudo apt install -f
Reading package lists… Done
Building dependency tree
Reading state information… Done
Correcting dependencies… Done
The following additional packages will be installed:
xz-utils
The following NEW packages will be installed:
xz-utils
0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded.
53 not fully installed or removed.
Need to get 0 B/268 kB of archives.
After this operation, 540 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
debconf: delaying package configuration, since apt-utils is not installed
(Reading database … 43963 files and directories currently installed.)
Preparing to unpack …/xz-utils_5.2.2-1.2+b1_mips.deb …
Unpacking xz-utils (5.2.2-1.2+b1) …
dpkg: error processing archive /var/cache/apt/archives/xz-utils_5.2.2-1.2+b1_mips.deb (–unpack):
trying to overwrite ‘/usr/bin/xzcat’, which is also in package busybox 9:1.27.2-ubnt1+t5371027.dev.stretch.v2.0.9.663bfa4df
Errors were encountered while processing:
/var/cache/apt/archives/xz-utils_5.2.2-1.2+b1_mips.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Hmmm…不知道这个mips的源如何,x86的源,可以不依赖xz-utils,这样:
apt purge xz-utils
apt install --no-install-recommends python-pip
如果用pip,建议搭配virtualenv使用
apt install --no-install-recommends virtualenv