I've already seen these answers, so please don't link em in solutions:
我已经看到了这些答案,所以请不要在解决方案中链接em:
Installing MongoDB on Ubuntu 16.04 https://unix.stackexchange.com/questions/220467/mongodb-unmet-dependencies/220483 can't install mongodb on ubuntu 16.10 https://www.digitalocean.com/community/tutorials/how-to-install-mongodb-on-ubuntu-16-04
在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-安装的-的MongoDB上,Ubuntu的16-04
I have already added the required repository for ubuntu 16.04
我已经为ubuntu 16.04添加了所需的存储库
When I run sudo apt-get install -y mongodb-org
, it throws the error:
当我运行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).
And on running apt-get -f install
, I get the following error:
在运行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)
And the same thing continues when I try to install it again.
当我尝试再次安装时,同样的事情继续下去。
Can anyone explain what's this error and how to install it ?
任何人都可以解释这个错误是什么以及如何安装它?
Update:
Running df -h
gives:
运行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
Running df -i
gives:
运行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 个解决方案
#1
3
Worked after installing libcurl3
安装libcurl3后工作
sudo apt install libcurl3
sudo apt install libcurl3
#2
2
Have you done the update?
你做过更新了吗?
sudo apt-get update && sudo apt-get upgrade
If the update does not help, try checking for broken dependencies:
如果更新没有帮助,请尝试检查损坏的依赖项:
sudo apt-get check
The check command is a diagnostic tool. It used to update package cache and checks for broken dependencies.
check命令是一种诊断工具。它用于更新包缓存并检查已损坏的依赖项。
I would also try two more things. First,
我还会尝试两件事。第一,
sudo dpkg --configure -a
sudo apt-get -f install
and if that does not help, try to unblock the dpkg
如果这没有帮助,请尝试取消阻止dpkg
sudo rm -rf /var/lib/apt/lists/partial/*
sudo apt-get -f install
I hope it helps.
我希望它有所帮助。
#3
0
Have you checked inodes on the server? df -h
may still show space left but you could be out of inodes. Please try running df -i
and see if you have any inodes left on the server.
你检查过服务器上的inode吗? df -h可能仍然显示空间,但你可能没有inode。请尝试运行df -i并查看服务器上是否还有任何inode。
#4
0
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6
echo "deb [ arch=amd64,arm64 ] http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list
sudo apt-get update
sudo apt-get install -y mongodb-org
sudo service mongod start
mongo
#5
0
Run the below command:
运行以下命令:
sudo apt-get -f install
sudo apt-get -f install
And then try running sudo apt-get install -y mongodb-org
然后尝试运行sudo apt-get install -y mongodb-org
#6
0
I also had the similar issue and it got resolved for me by doing this Go to this directory /etc/apt/sources.list.d/
and check if there are anyother mongodb-org-*.list files as it would cause conflicts.
我也有类似的问题,它通过这样做解决了我去了这个目录/etc/apt/sources.list.d/并检查是否还有mongodb-org - * .list文件,因为它会引起冲突。
then try to install it again, if again issue arises, then run
然后尝试再次安装,如果再次出现问题,然后运行
sudo apt purge mongod* sudo apt purge mongodb* sudo apt purge mongodb-org*
sudo apt purge mongod * sudo apt purge mongodb * sudo apt purge mongodb-org *
to remove any inconsistency and then go to https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/ and follow the procedure.
删除任何不一致,然后转到https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/并按照该过程。
If you're some kind of Ubuntu Derivatives like Linux Mint, Ubuntu GNOME etc, make sure which Ubuntu version is running on your ubuntu derivative version on wiki before pasting the required commands. As in my case I'm using Linux Mint 17 -> Ubuntu 14.04 and I was installing with Ubuntu 16.04 that made the conflict
如果您是某种Ubuntu衍生产品,如Linux Mint,Ubuntu GNOME等,请在粘贴所需命令之前确保在wiki上的ubuntu衍生版本上运行哪个Ubuntu版本。在我的情况下,我使用的是Linux Mint 17 - > Ubuntu 14.04,我正在使用Ubuntu 16.04进行安装
Hope this would resolve the issue.
希望这能解决问题。
#1
3
Worked after installing libcurl3
安装libcurl3后工作
sudo apt install libcurl3
sudo apt install libcurl3
#2
2
Have you done the update?
你做过更新了吗?
sudo apt-get update && sudo apt-get upgrade
If the update does not help, try checking for broken dependencies:
如果更新没有帮助,请尝试检查损坏的依赖项:
sudo apt-get check
The check command is a diagnostic tool. It used to update package cache and checks for broken dependencies.
check命令是一种诊断工具。它用于更新包缓存并检查已损坏的依赖项。
I would also try two more things. First,
我还会尝试两件事。第一,
sudo dpkg --configure -a
sudo apt-get -f install
and if that does not help, try to unblock the dpkg
如果这没有帮助,请尝试取消阻止dpkg
sudo rm -rf /var/lib/apt/lists/partial/*
sudo apt-get -f install
I hope it helps.
我希望它有所帮助。
#3
0
Have you checked inodes on the server? df -h
may still show space left but you could be out of inodes. Please try running df -i
and see if you have any inodes left on the server.
你检查过服务器上的inode吗? df -h可能仍然显示空间,但你可能没有inode。请尝试运行df -i并查看服务器上是否还有任何inode。
#4
0
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6
echo "deb [ arch=amd64,arm64 ] http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list
sudo apt-get update
sudo apt-get install -y mongodb-org
sudo service mongod start
mongo
#5
0
Run the below command:
运行以下命令:
sudo apt-get -f install
sudo apt-get -f install
And then try running sudo apt-get install -y mongodb-org
然后尝试运行sudo apt-get install -y mongodb-org
#6
0
I also had the similar issue and it got resolved for me by doing this Go to this directory /etc/apt/sources.list.d/
and check if there are anyother mongodb-org-*.list files as it would cause conflicts.
我也有类似的问题,它通过这样做解决了我去了这个目录/etc/apt/sources.list.d/并检查是否还有mongodb-org - * .list文件,因为它会引起冲突。
then try to install it again, if again issue arises, then run
然后尝试再次安装,如果再次出现问题,然后运行
sudo apt purge mongod* sudo apt purge mongodb* sudo apt purge mongodb-org*
sudo apt purge mongod * sudo apt purge mongodb * sudo apt purge mongodb-org *
to remove any inconsistency and then go to https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/ and follow the procedure.
删除任何不一致,然后转到https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/并按照该过程。
If you're some kind of Ubuntu Derivatives like Linux Mint, Ubuntu GNOME etc, make sure which Ubuntu version is running on your ubuntu derivative version on wiki before pasting the required commands. As in my case I'm using Linux Mint 17 -> Ubuntu 14.04 and I was installing with Ubuntu 16.04 that made the conflict
如果您是某种Ubuntu衍生产品,如Linux Mint,Ubuntu GNOME等,请在粘贴所需命令之前确保在wiki上的ubuntu衍生版本上运行哪个Ubuntu版本。在我的情况下,我使用的是Linux Mint 17 - > Ubuntu 14.04,我正在使用Ubuntu 16.04进行安装
Hope this would resolve the issue.
希望这能解决问题。