我在完全不受支持的机器上安装了Unifi:
root@EvoWebsites:/home/pklys# apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
unifi : Depends: mongodb-server (< 1:3.6.0) but 1:3.6.3-0ubuntu1 is installed or
mongodb-10gen (< 3.6.0) but it is not installable or
mongodb-org-server (< 3.6.0) but it is not installable
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
现在,虽然我能够管理Unifi的ugprades (它的依赖性不是真正的strick ),但我不能再对其余的包使用apt升级了。
有没有一种方法可以“跳过”unifi和它的依赖升级,因为我已经对Unifi进行了手动升级,并告诉apt升级了所有其他的东西,忽略了Unifi的意思?
我试过的是:
root@EvoWebsites:/home/pklys# apt-mark hold unifi
unifi was already set on hold.
root@EvoWebsites:/home/pklys# apt update
Hit:1 http://ppa.launchpad.net/ondrej/apache2/ubuntu bionic InRelease
Get:2 http://security.ubuntu.com/ubuntu bionic-security InRelease [83.2 kB]
Hit:3 http://pl.archive.ubuntu.com/ubuntu bionic InRelease
Get:4 http://pl.archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Get:5 http://pl.archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
Get:6 http://pl.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [322 kB]
Get:7 http://pl.archive.ubuntu.com/ubuntu bionic-updates/main i386 Packages [286 kB]
Get:8 http://pl.archive.ubuntu.com/ubuntu bionic-updates/universe i386 Packages [192 kB]
Get:9 http://pl.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [192 kB]
Get:10 http://pl.archive.ubuntu.com/ubuntu bionic-updates/multiverse i386 Packages [4,360 B]
Get:11 http://pl.archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 Packages [4,200 B]
Fetched 1,247 kB in 1s (2,426 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
98 packages can be upgraded. Run 'apt list --upgradable' to see them.
root@EvoWebsites:/home/pklys# apt upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
unifi : Depends: mongodb-server (< 1:3.6.0) but 1:3.6.3-0ubuntu1 is installed or
mongodb-10gen (< 3.6.0) but it is not installable or
mongodb-org-server (< 3.6.0) but it is not installable
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
来澄清。最终的目标是升级除了UNIFI之外的所有东西,如果不可能的话,MongoDB。Ubiquiti的最新升级增加了对UNIFI到MongoDB3.4的依赖。如果你像我一样升级到18.04,你会得到3.6,这破坏了Unifi。为了修复它,我已经卸载了Unifi,重新安装了Unifi,并从备份中获得了配置,并且它在3.6+ mongodb上运行良好。我的猜测是Ubiquiti没有为剩下的用户自动化这个过程,所以为了稳定发布,他们添加了这个依赖项。
现在,由于我已经升级,我需要保持我的机器最新。因此,现在我需要跳过Unifi升级(我直接从dpkg安装它们,直接使用跳过依赖项),但是继续升级其他东西。
希望它既解释了原因,也解释了最终目标。
发布于 2018-10-05 02:10:24
所有好的答案我都选择了不同的方法。为什么要修复Ubuntu而我可以修复Unifi包!
这里的全部故事:https://evotec.xyz/ubuntu-18-04-fixing-unifi-deb-package-to-run-with-3-6-mongodb/
但是想法是下载包,解包包
cd /home/username
wget https://dl.ubnt.com/unifi/5.9.29/unifi_sysvinit_all.deb
mkdir tmp
dpkg-deb -R unifi_sysvinit_all.deb tmp
查找DEBIAN\control
文件,然后简单地从“依赖”部分删除第7-8行。
Package: unifi
Version: 5.9.29-11384-1
Section: java
Priority: optional
Architecture: all
Depends: binutils, coreutils, adduser, libcap2, curl,
mongodb-server (>= 2.4.10) | mongodb-10gen (>= 2.4.14) | mongodb-org-server (>= 2.6.0),
mongodb-server (<< 1:3.6.0) | mongodb-10gen (<< 3.6.0) | mongodb-org-server (<< 3.6.0),
java8-runtime-headless, jsvc (>=1.0.8)
Pre-Depends: debconf (>= 0.5) | debconf-2.0
Conflicts: unifi-controller
Provides: unifi-controller
Replaces: unifi-controller
Installed-Size: 143115
Maintainer: UniFi developers <unifi-dev@ubnt.com>
Description: Ubiquiti UniFi server
Ubiquiti UniFi server is a centralized management system for UniFi suite of devices.
After the UniFi server is installed, the UniFi controller can be accessed on any
web browser. The UniFi controller allows the operator to instantly provision thousands
of UniFi devices, map out network topology, quickly manage system traffic, and further
provision individual UniFi devices.
Homepage: http://www.ubnt.com/unifi
在重新包装之后:
dpkg-deb -b temporary unifi-fixed.deb
dpkg-deb: building package 'unifi' in 'unifi-fixed.deb'.
只需安装dpkg -i unifi-fixed.deb
即可。安装apt update
后,apt upgrade
工作!
发布于 2018-09-14 07:08:37
对于MongoDB 3.4,请尝试以下操作。
首先删除MongoDB的任何列表文件
sudo rm /etc/apt/sources.list.d/mongodb*
接下来,添加键
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A15703C6
现在添加3.4的存储库
sudo bash -c 'echo "deb http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 multiverse" > /etc/apt/sources.list.d/mongodb-org-3.4.list'
现在运行更新和升级。
sudo apt update
sudo apt upgrade
发布于 2018-09-14 07:02:47
您有一个具有未满足的依赖项的包(unifi
)。Apt包装系统认为未满足的依赖是一个大问题,并将继续抱怨,直到它得到解决。没有其他方法可以阻止它。
要解决这个问题,您必须安装缺少的依赖项或删除unifi
。
https://askubuntu.com/questions/1075264
复制相似问题