I uninstalled mongo from my ubuntu and tried to install it again but getting below error now
Errors were encountered while processing:
/var/cache/apt/archives/mongodb-org-server_4.2.7_amd64.deb
/var/cache/apt/archives/mongodb-org-mongos_4.2.7_amd64.deb
/var/cache/apt/archives/mongodb-org-tools_4.2.7_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
I follwed below mentioned link to install mongo again-
https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/
Can anybody help me out with this?
You can force the installation package and resume it again.
sudo dpkg -i --force-all /var/cache/apt/archives/mongodb-org-tools_4.2.7_amd64.deb
sudo apt-get install -f
Related
I'm using ubuntu 16.04 and last week I try to install some virtual machine on my computer but I failed to do it.
Now when I try to install any program from the apt-get install I got this text:
sudo apt-get install build-essential git libssl-dev
[sudo] password for eliya:
Reading package lists... Done
Building dependency tree
Reading state information... Done
build-essential is already the newest version (12.1ubuntu2).
git is already the newest version (1:2.7.4-0ubuntu1.5).
libssl-dev is already the newest version (1.0.2g-1ubuntu4.13).
The following packages were automatically installed and are no longer required:
libavdevice-ffmpeg56 linux-headers-4.4.0-134 linux-headers-4.4.0-134-generic
linux-image-4.4.0-134-generic linux-image-extra-4.4.0-134-generic
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 103 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up virtualbox-ext-pack (5.1.38-0ubuntu1.16.04.1) ...
removing old virtualbox extension packs
virtualbox-ext-pack: downloading: http://download.virtualbox.org/virtualbox/5.1.38/Oracle_VM_VirtualBox_Extension_Pack-5.1.38.vbox-extpack
The file will be downloaded into /usr/share/virtualbox-ext-pack
License accepted.
0%...
Progress state: NS_ERROR_FAILURE
VBoxManage: error: Failed to install "/usr/share/virtualbox-ext-pack/Oracle_VM_VirtualBox_Extension_Pack-5.1.38.vbox-extpack"
VBoxManage: error: The installer failed with exit code 1: VBoxExtPackHelperApp: error: World writable: '/usr'
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component ExtPackManagerWrap, interface IExtPackManager
VBoxManage: error: Context: "RTEXITCODE handleExtPack(HandlerArg*)" at line 1201 of file VBoxManageMisc.cpp
Hash mismatch Oracle_VM_VirtualBox_Extension_Pack-5.1.38.vbox-extpack: expected e93d87b0f5de50369baca0a48082236b947df5b922ffd0233c0fa92c1206defd, or wrong accept-license key, removing the file.
dpkg: error processing package virtualbox-ext-pack (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
virtualbox-ext-pack
E: Sub-process /usr/bin/dpkg returned an error code (1)
And now i can't install anything because this problam.
Thank you
1.Reconfigure Package Database
sudo dpkg --configure -a
2.force install
sudo apt-get install -f
Then try again installing virtualbox
I am trying to download mongodb compass from the following steps:
Download the package:
wget https://downloads.mongodb.com/compass/mongodb-compass_1.12.5_amd64.deb;
Installing Compass:
sudo dpkg -i mongodb-compass_1.12.5_amd64.deb;
But the last command returns error which is as follows:
dpkg: error processing package mongodb-compass (--install):
dependency problems - leaving unconfigured Processing triggers for
desktop-file-utils (0.23-1ubuntu3.18.04.1) ... Processing triggers for
gnome-menus (3.13.3-11ubuntu1) ... Processing triggers for
mime-support (3.60ubuntu1) ... Errors were encountered while
processing: mongodb-compass
Instead of error, a compass is downloaded, but that does not open. How could I download?
try this:
sudo apt --fix-broken install
and then
sudo dpkg -i mongodb-compass_1.12.5_amd64.deb;
my problem fixed with this.
I think that you need to install libgconf-2-4.
So run the following command :
apt-get install libgconf-2-4
Go to the folder where your file is downloaded and then run this command:-
sudo dpkg -i mongodb-compass_1.26.1_amd64.deb
This will solve your problem.
I think you exeperience dependency issues.
Try this :
sudo apt-get install -f
just after you dpkg
I found it from : https://www.atechtown.com/dpkg-dependency-problems/
I tried to install java 8 on ubuntu 16.04.
The steps followed are :
$ sudo add-apt-repository ppa:webupd8team/java
$ sudo apt-get update
$ sudo apt install oracle-java8-installer
while running sudo apt install oracle-java8-installer I got the below error.
dpkg: error processing package unattended-upgrades (--configure):
subprocess installed post-installation script returned error exit status 127
No apport report written because MaxReports is reached already
Errors were encountered while processing:
openjdk-8-jre-headless:amd64
locales
oracle-java8-installer
linux-image-4.4.0-78-generic
linux-image-extra-4.4.0-78-generic
linux-image-generic
linux-generic
openjdk-8-jre:amd64
postgresql-common
postgresql-9.6
postgresql-contrib-9.6
postgresql-contrib
sysstat
tomcat8
unattended-upgrades
E: Sub-process /usr/bin/dpkg returned an error code (1)
Please suggest me how to overcome by this error on Ubuntu and suggest the steps to install oracle-java8.
Open Terminal -> and do the following steps sequentially:
sudo add-apt-repository ppa:openjdk-r/ppa
sudo apt-get update
sudo apt-get install openjdk-8-jdk
and finally type:java -version.
This command will show you whether jdk installed in your Ubuntu or not.
I have installed a mongodb instance once, but it stops running for a reason that I could not managed to solve. So I installed MongoDb 3.4 by using offical docs. There are 5 modules according to the installer. One of them is mongodb-org-server which install mongod (mongo daemonized). When I run the command:
sudo yum install -y mongodb-org
It installs all of modules except mongodb-org-server. It says it's installed. However, when I run mongod, I get there is no such a command. After that I tried to remove all of the modules:
sudo yum erase $(rpm -qa | grep mongodb-org)
It does not manage to remove mongodb-org-server and throws the error below:
Running Transaction
Erasing: mongodb-org-3.4.1-1.el6.x86_64 1/5
error reading information on service mongod: No such file or directory
error: %preun(mongodb-org-server-3.4.1-1.el6.x86_64) scriptlet failed, exit status 1
Error in PREUN scriptlet in rpm package mongodb-org-server
How I can fix this? I'll glad for your helps. Thanks.
I fixed the issue. Reinstalled the server package and deleted successfully.
sudo yum reinstall -y mongodb-org-server.x86_64
I am trying to install mongodb 3.2 into codio using the terminal and I am following the guide on their website here. (I'm new to mongodb and nosql)
I got to Step 4 Installing mongodb using this command:
sudo apt-get install -y mongodb-org
Got the following at the end:
..
The following packages will be upgraded:
mongodb-org
1 upgraded, 0 newly installed, 0 to remove and 51 not upgraded.
2 not fully installed or removed.
Need to get 3,554 B of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://repo.mongodb.org/apt/ubuntu/ trusty/mongodb-org/3.2/multiverse mongodb-org amd64 3.2.2 [3,554 B]
Fetched 3,554 B in 0s (249 kB/s)
(Reading database ... 37250 files and directories currently installed.)
Preparing to unpack .../mongodb-org_3.2.2_amd64.deb ...
Unpacking mongodb-org (3.2.2) over (3.2.1) ...
Setting up mongodb-org-server (3.2.2) ...
start: Job failed to start
invoke-rc.d: initscript mongod, action "start" failed.
dpkg: error processing package mongodb-org-server (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of mongodb-org:
mongodb-org depends on mongodb-org-server; however:
Package mongodb-org-server is not configured yet.
dpkg: error processing package mongodb-org (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
mongodb-org-server
mongodb-org
E: Sub-process /usr/bin/dpkg returned an error code (1)
Then I run
sudo service mongod start
or
sudo service mongodb start
Both commands will response with start: Job failed to start or mongodb: unrecognized service
Am I missing something here like e.g. mongodb requires other packages to be installed? following wrong guide version? do I need to create config file? if I do how? because it did not create one, or mongodb doesn't work on codio using the built-in terminal? Is mongodb-org-server already installed or running? I've been searching for exact or similar things, also tried different command but no luck.
This is because of the ulimit settings in the service script of mongod.
Mongodb recommends 64000 for 'open files' key in ulimit settings.
https://docs.mongodb.org/manual/reference/ulimit/#recommended-settings
In codio this is set to 4096.
run the below command in codio terminal and see the 'open files' setting.
ulimit -a
I don't think this value can be changed at OS level in codio. However, we can remove this setting (NOT recommended by MongoDb) from the upstart file.
Steps:
1. To keep it simple and less verbose, start with installing just mongodb-org-server instead of installing the complete mongodb-org.
sudo apt-get install -y mongodb-org-server
2. As we know it fails with errors - '..Job failed to start ..' bla..bla. Just ignore them for a min. Edit '/etc/init/mongod.conf' file as root in whatever editor you like. I like vim. :)
sudo vim /etc/init/mongod.conf
3. Comment out(type '#' at the beginning of the line) the line starts with 'limit nofile' as below. Then save and close the file.
#limit nofile 64000 64000
4. Now install the complete 'mongodb-org' package by running the command in terminal as shown below.
sudo apt-get install -y mongodb-org
5. Go ahead try mongo in terminal now. If the mongod service is running, it connects to the default db successfully.
Hope this helps.
Thank you.