I've already seen these answers, so please don't link em in solutions:
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
I have already added the required repository for ubuntu 16.04
When I run sudo apt-get install -y mongodb-org, it throws the error:
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:
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:
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:
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
Worked after installing libcurl3
sudo apt install libcurl3
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.
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*
to remove any inconsistency and then go to https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/ and follow the procedure.
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
Hope this would resolve the issue.
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.
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
sudo rm -rf /var/lib/apt/lists/partial/*
sudo apt-get -f install
I hope it helps.
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
Run the below command:
sudo apt-get -f install
And then try running sudo apt-get install -y mongodb-org
Download the MongoDB Community Server (.dbz) version
Extract it and move it to home directory
Edit the ~/.profile by running:
gedit ~/.profile
Then add this:
echo export PATH=mongodb-linux-x86_64-ubuntu1804-4.0.4/bin:$PATH
Save then update the system variables by running:
source ~/.profile
After that, start server by running:
mongod
I have tried many answers, but at last, I found that make system version is not matched to the mongo repo required version. At MongoDB official website, there is an option to let you choose the correct repo link.
So, check your system version firstly with:
lsb_release -dc
Then if your system version is 18.04, try
echo "deb [ arch=amd64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.0.list
If your system version is 16.04, try
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/4.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.0.list
I was facing the same issue. I tried to install using brew but it didin't work for me. I followed all the steps mentioned on the official website, but it didn't work.
I created a specific sources.list file for MongoDB and added to the sources.list directory which is always used by apt. Make sure you use the same format as sources.list
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list
Next, we need to update to make apt use updated sources.list. So I used update command.
sudo apt-get update
Finally, I executed the installation command and it worked.
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.
For installing mongodb 4.0 in ubuntu 16.04
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/4.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.0.list
sudo apt install libcurl3
sudo apt-get update
sudo service mongod start
mongo
Remove those files by using this command.
sudo dpkg -i --force-overwrite /var/cache/apt/archives/mongodb-org-mongos_4.4.4_amd64.deb; sudo dpkg -i --force-overwrite /var/cache/apt/archives/mongodb-org-server_4.4.4_amd64.deb; sudo dpkg -i --force-overwrite /var/cache/apt/archives/mongodb-org-tools;
and then run
sudo apt-get install -y mongodb-org;
sudo systemctl start mongod;
Related
I've tried following the instructions to install mongodb, as per the mongodb.com instructions.
When I run: sudo apt-get install -y mongodb-org, I get the following:
The following packages have unmet dependencies.
mongodb-org-tools : Depends: mongodb-database-tools but it is not going to be installed
There's a suggestion to run apt --fix-broken install. So I run it with sudo. I get the following:
The following packages were automatically installed and are no longer required:
libboost-program-options1.65.1 libgoogle-perftools4 libpcrecpp0v5 libtcmalloc-minimal4 libyaml-cpp0.5v5 mongo-tools
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
mongodb-database-tools
Which then fails, with this error report:
Unpacking mongodb-database-tools (100.5.0) ...
dpkg: error processing archive /var/cache/apt/archives/mongodb-database-tools_100.5.0_amd64.deb (--unpack):
trying to overwrite '/usr/bin/bsondump', which is also in package mongo-tools 3.6.3-0ubuntu1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/mongodb-database-tools_100.5.0_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
My reading of this: trying to overwrite '/usr/bin/bsondump', which is also in package mongo-tools 3.6.3-0ubuntu1 suggests to me that there is something in mongo-tools that is stubbornly not letting itself be removed. So I tried running sudo apt autoremove to remove the mongo-tools. Unfortunately I get the following:
The following packages have unmet dependencies.
mongodb-org-tools : Depends: mongodb-database-tools but it is not installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
So I try apt --fix-broken install again, as recommended, but without any success. I need to find a way to get rid of that darned mongo-tools - but how? I tried following the "Uninstall MongoDB Community Edition" instructions on those on the same page I linked above.
When I enter sudo apt-get purge mongodb-org*, this forms part of the message:
The following packages were automatically installed and are no longer required:
libboost-program-options1.65.1 libgoogle-perftools4 libpcrecpp0v5 libtcmalloc-minimal4 libyaml-cpp0.5v5 mongo-tools mongodb-mongosh
Use 'sudo apt autoremove' to remove them.
So now I have mongo-tools and this new mongodb-mongosh? I've attempted to install again but I run into the same problems. What's the fix?
1.Stop the mongod process by issuing the following command:-
sudo service mongod stop
2.Remove any MongoDB packages that you had previously installed:-
sudo apt-get purge mongodb-org*
3.Remove MongoDB databases and log files:-
sudo rm -r /var/log/mongodb
sudo rm -r /var/lib/mongodb
4.Then reinstall mangodb 4.4.8
5.Import the public key used by the package management system:-
wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add -
6.The following instruction is for Ubuntu 18.04 (Bionic):-
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list
7.Update Apt
sudo apt-get update
8.Install mongodb
sudo apt-get install mongodb-org=4.4.8 mongodb-org-server=4.4.8 mongodb-org-shell=4.4.8 mongodb-org-mongos=4.4.8 mongodb-org-tools=4.4.8
9.Use mongod --version to check its succesfully installed.
10.If u encounter any error while using mongod
sudo mkdir /data
cd /data
sudo mkdir db
sudo pkill -f mongod
11.Then use sudo mongod command to start server.
12.Use mongo to use mongodb shell
Finally got it working: I tried sudo apt-get purge mongo-tools* and sudo apt-get purge mongodb-mongosh*, and this seemed to fix things and permit an install.
For some reason, the uninstall directions in the documentation (command: sudo apt-get purge mongodb-org*) didn't remove mongo-tools. It may have been something I'd installed from another source previously.
I was trying to uninstall and reinstall Cassandra on my Ubuntu system however in an attempt to cleanup I deleted file names with cassandra in it, and accidentally deleted requisite file including the /etc/apt/sources.list.d/cassandra.sources.list file. And now when I try to install Cassandra using the command sudo apt-get install cassandra, it gives the error E: Package 'cassandra' has no installation candidate. How can I fix this?
I ran sudo apt-get update and the cassandra.sources.list file seems to have come back, with content deb [arch=amd64] https://downloads.apache.org/cassandra/debian 311x main but it still gives same error on trying to install cassandra
I was able to follow the documentation to install cassandra, the only thing that I adjusted was the curl -L flag but apart from that this can solve your problem.
$ echo "deb http://www.apache.org/dist/cassandra/debian 40x main" | sudo tee -a /etc/apt/sources.list.d/cassandra.sources.list
deb http://www.apache.org/dist/cassandra/debian 40x main
# Make sure the `cassandra.sources.list` file has only this single line.
$ sudo cat /etc/apt/sources.list.d/cassandra.sources.list
deb http://www.apache.org/dist/cassandra/debian 40x main
$ curl -L https://www.apache.org/dist/cassandra/KEYS | sudo apt-key add -
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 227 100 227 0 0 4283 0 --:--:-- --:--:-- --:--:-- 4283
100 267k 100 267k 0 0 296k 0 --:--:-- --:--:-- --:--:-- 296k
OK
$ sudo apt-get update
$ sudo apt-get install cassandra
This error indicates that APT was not able to find a source for the package:
E: Package 'cassandra' has no installation candidate
The cause for the error is that you added the wrong repository in your sources:
deb [arch=amd64] https://downloads.apache.org/cassandra/debian 311x main
If you have a look at the Cassandra installation document I wrote on the Apache website, the correct repository is www.apache.org/dist/cassandra/debian.
If you want to install Cassandra 3.11, You need to delete your source and update it with:
$ sudo rm /etc/apt/sources.list.d/cassandra.sources.list
$ echo "deb http://www.apache.org/dist/cassandra/debian 311x main" | sudo tee -a /etc/apt/sources.list.d/cassandra.sources.list
You'll need to follow the document above to add the repo keys and update the package index on your server. Then to install C* 3.11.11 (for example), run:
$ sudo apt-get install cassandra=3.11.11-1
You'll need to adapt the command above to the specific version you want to install. Otherwise, APT will attempt to install the latest version. Cheers!
The comment above solved my problem ^
deb [arch=amd64] https://downloads.apache.org/cassandra/debian 311x main
I'm working with chromeos 80 and am using debian buster in crostini. I want to use the snap package manager. When I try:
~$sudo snap install hello-world
error: system does not fully support snapd: cannot mount squashfs image using "squashfs": mount:
/tmp/sanity-mountpoint-962423259: mount failed: Operation not permitted.
How can I get this working?
Try this way to install SNAPD
sudo apt install libsquashfuse0 squashfuse fuse
sudo apt install snapd
Now select package name:
sudo snap install gimp
Under CentOS 8 we have a file /etc/modprobe.d/CIS.conf with all unused file systems disabled. Removing the line: install squashfs /bin/true resolves the error
Try:
sudo modprobe loop
Here is a relevant forum post based on your error.
Under Redhat7 we have a file /etc/modprobe.d/NCIRC.conf with all unused file systems disabled. Removing the line: install squashfs /bin/true resolves the error here as well
On Centos or Fedora:
$ sudo dnf install squashfs-tools squashfuse
I uploaded a repo to my Digit Ocean droplet about a year ago and tried to npm install without luck. I recently decided to give it a go again and try to get this figured out, but again, still getting the "Killed" error when I try to npm install.
I understand a few of the packages are deprecated, but would that completely kill the install process? The same project files work on my local machine (of course it only works locally). I'm not sure if the different versions of Node would be the primary cause.
Local Node -v 6.9.1
Drop Node -v 9.2.0
Any ideas would be highly appreciated!
Screen shot from terminal is attached.
Well, I found the answer I was looking for.
Adding a swap file allowed the npm install process to fully complete.
To solve this issue on 14.04 and 16.04:
sudo fallocate -l 1G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
sudo swapon --show
sudo cp /etc/fstab /etc/fstab.bak
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
sudo sysctl vm.swappiness=10
echo 'vm.swappiness=10' | sudo tee -a /etc/sysctl.conf
sudo sysctl vm.vfs_cache_pressure=50
echo 'vm.vfs_cache_pressure=50' | sudo tee -a /etc/sysctl.conf
Source: https://www.digitalocean.com/community/questions/npm-gets-killed-no-matter-what
Looking at your console it tells you that some packages are deprecated and need to be updated try doing that.
Run the following:
sudo npm install minimatch graceful-fs babel-preset-env nodemailer
sudo npm cache clean -f
sudo npm install -g n
sudo n stable
and as for the gulp-util read : https://github.com/gulpjs/gulp-util as that package is deprecated
(the response also states your node version is 4.2)
i tried:
mkfs.ntfs /dev/sdc1
but command not found, and the locate command shows nothing for mkfs.ntfs.
I tried gparted but the ntfs is hidden...Can anybody help to me?
sudo yum install ntfsprogs
sudo yum install ntfs-3g
- EPEL repository
yum -y install epel-release
- Install ntfs-3g
yum -y install ntfs-3g
- Update Grub
grub2-mkconfig -o /boot/grub2/grub.cfg
The issue is not really a format disk problem - it is more of a "how to I access nfs".
Assuming that you are using Ubuntu or Debian then you simple need to add the nfs file system options - which are not installed by default.
sudo apt-get install ntfs-3g
At this point - your mkfs should work as well as gparted
I hope this works well for you.