我已经看到了这些答案,所以请不要在解决方案中链接em:
在Ubuntu 16.04上安装MongoDB https://unix.stackexchange.com/questions/220467/mongodb-unmet-dependencies/220483无法在ubuntu 16.10上安装mongodb https://www.digitalocean.com/community/tutorials/how -to-安装-的MongoDB上,Ubuntu的16-04
我已经为ubuntu 16.04添加了所需的存储库
当我运行 sudo apt-get install -y mongodb-org
时,它会抛出错误:
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
linux-headers-4.4.0-93-generic : Depends: linux-headers-4.4.0-93 but it is not going to be installed
mongodb-org : Depends: mongodb-org-shell but it is not going to be installed
Depends: mongodb-org-server but it is not going to be installed
Depends: mongodb-org-mongos but it is not going to be installed
Depends: mongodb-org-tools 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
时,我收到以下错误:
Unpacking linux-headers-4.4.0-93 (4.4.0-93.116) ...
dpkg: error processing archive /var/cache/apt/archives/linux-headers-4.4.0-93_4.4.0-93.116_all.deb (--unpack):
unable to create '/usr/src/linux-headers-4.4.0-93/arch/xtensa/include/asm/pgtable.h.dpkg-new' (while processing './usr/src/linux-headers-4.4.0-93/arch/xtensa/include/asm/pgtable.h'): No space left on device
No apport report written because the error message indicates a disk full error
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/linux-headers-4.4.0-93_4.4.0-93.116_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
当我尝试再次安装时,同样的事情继续下去 .
任何人都可以解释这个错误是什么以及如何安装它?
Update:
运行 df -h
给出:
Filesystem Size Used Avail Use% Mounted on
udev 487M 0 487M 0% /dev
tmpfs 100M 12M 88M 12% /run
/dev/xvda1 7.8G 5.3G 2.1G 72% /
tmpfs 496M 0 496M 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 496M 0 496M 0% /sys/fs/cgroup
tmpfs 100M 0 100M 0% /run/user/1000
运行 df -i
给出:
Filesystem Inodes IUsed IFree IUse% Mounted on
udev 124466 360 124106 1% /dev
tmpfs 126788 480 126308 1% /run
/dev/xvda1 524288 520744 3544 100% /
tmpfs 126788 1 126787 1% /dev/shm
tmpfs 126788 6 126782 1% /run/lock
tmpfs 126788 16 126772 1% /sys/fs/cgroup
tmpfs 126794 4 126790 1% /run/user/1000
6 回答
安装
libcurl3
后工作sudo apt install libcurl3
你做过更新了吗?
如果更新没有帮助,请尝试检查损坏的依赖项:
check命令是一种诊断工具 . 它用于更新包缓存并检查已损坏的依赖项 .
我还会尝试两件事 . 第一,
如果这没有帮助,请尝试取消阻止dpkg
我希望它有所帮助 .
你检查过服务器上的inode吗?
df -h
可能仍然显示空间,但您可能没有inode . 请尝试运行df -i
并查看服务器上是否还有任何inode .运行以下命令:
然后尝试运行
sudo apt-get install -y mongodb-org
我也有类似的问题,它通过这样做解决了我转到这个目录
/etc/apt/sources.list.d/
并检查是否还有mongodb-org - * .list文件,因为它会导致冲突 .然后尝试再次安装,如果再次出现问题,然后运行
sudo apt purge mongod* sudo apt purge mongodb* sudo apt purge mongodb-org*
删除任何不一致,然后转到https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/并按照该过程 .
如果您是某种Ubuntu衍 生产环境 品,如Linux Mint,Ubuntu GNOME等,请在粘贴所需命令之前确保在wiki上的ubuntu衍生版本上运行哪个Ubuntu版本 . 在我的情况下,我使用的是Linux Mint 17 - > Ubuntu 14.04,我正在使用Ubuntu 16.04进行安装
希望这能解决问题 .