Postgresql not getting installed on ubuntu 20 - linux

I have recently upgraded my ubuntu to 20.04. Now, I am trying to install the postgresql but I am getting error. I have tried to 100 different ways and crawled every web but nothing worked.
These are the steps I followed:
Step 1
sudo apt update
Step 2
sudo apt install postgresql postgresql-contrib
Here is the error log
Setting up postgresql-common (223.pgdg20.04+1) ...
dpkg: error processing package postgresql-common (--configure):
installed postgresql-common package post-installation script subprocess returned error exit status 10
dpkg: dependency problems prevent configuration of postgresql-13:
postgresql-13 depends on postgresql-common (>= 182~); however:
Package postgresql-common is not configured yet.
dpkg: error processing package postgresql-13 (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of postgresql:
postgresql depends on postgresql-13; however:
Package postgresql-13 is not configured yet.
dpkg: error processing package postgresql (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of postgresql-contrib:
postgresql-contrib depends on postgresql-contrib-13; however:
Package postgresql-contrib-13 is not installed.
Package postgresql-13 which provides postgresql-contrib-13 is not configured yet.
dpkg: error processing package postgresql-contrib (--configure):
dependency problems - leaving unconfigured
Processing triggers for man-db (2.No apport report written because the error message indicates its a followup error from a previous failure.
No apport report written because MaxReports is
reached already
No apport report written because MaxReports is reached already
9.1-1) ...
Processing triggers for systemd (245.4-4ubuntu3.3) ...
Errors were encountered while processing:
sysstat
postgresql-common
postgresql-13
postgresql
postgresql-contrib
E: Sub-process /usr/bin/dpkg returned an error code (1)
Somebody please help me here

Related

mk-sbuild error: Package libeatmydata1 is not installed

I am trying to compile a few 32 bit debs on my 64 bit Lubuntu (21.10 - Impish Indri). The target is Focal though and I have been trying to build the chroot with mk-sbuild.
The command I ran is mk-sbuild focal --arch=i386 --debootstrap-include=eatmydata
But, even after specifically mentioning eat my data, it still stops at:
I: Configuring build-essential...
I: Configuring libc-bin...
W: Failure while configuring base packages. This will be re-attempted up to five times.
W: See /var/lib/schroot/chroots/focal-i386/debootstrap/debootstrap.log for details (possibly the package eatmydata is at fault)
W: Failure while configuring base packages. This will be re-attempted up to five times.
W: See /var/lib/schroot/chroots/focal-i386/debootstrap/debootstrap.log for details (possibly the package eatmydata is at fault)
W: Failure while configuring base packages. This will be re-attempted up to five times.
W: See /var/lib/schroot/chroots/focal-i386/debootstrap/debootstrap.log for details (possibly the package eatmydata is at fault)
W: Failure while configuring base packages. This will be re-attempted up to five times.
W: See /var/lib/schroot/chroots/focal-i386/debootstrap/debootstrap.log for details (possibly the package eatmydata is at fault)
W: Failure while configuring base packages. This will be re-attempted up to five times.
W: See /var/lib/schroot/chroots/focal-i386/debootstrap/debootstrap.log for details (possibly the package eatmydata is at fault)
And, upon checking the log, these are the lines where the problem starts:
Setting up g++-9 (9.3.0-10ubuntu2) ...
Setting up g++ (4:9.3.0-1ubuntu2) ...
update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode
Setting up build-essential (12.8ubuntu1) ...
Processing triggers for libc-bin (2.31-0ubuntu9) ...
Errors were encountered while processing:
eatmydata
dpkg: dependency problems prevent configuration of eatmydata:
eatmydata depends on libeatmydata1 (>= 105-7); however:
Package libeatmydata1 is not installed.
dpkg: error processing package eatmydata (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
eatmydata
dpkg: dependency problems prevent configuration of eatmydata:
eatmydata depends on libeatmydata1 (>= 105-7); however:
Package libeatmydata1 is not installed.
dpkg: error processing package eatmydata (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
eatmydata
dpkg: dependency problems prevent configuration of eatmydata:
eatmydata depends on libeatmydata1 (>= 105-7); however:
Package libeatmydata1 is not installed.
dpkg: error processing package eatmydata (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
eatmydata
dpkg: dependency problems prevent configuration of eatmydata:
eatmydata depends on libeatmydata1 (>= 105-7); however:
Package libeatmydata1 is not installed.
dpkg: error processing package eatmydata (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
eatmydata
After trying both pbuilder and debuild I thought sbuild might be the only viable option to build 32 bit debs on a bit OS. But, it's not easy too.
By the way, the 64 bit build goes fine and doesn't ask for eatmydata at all.
Thank you in advance.

error processing package python3-pip (--configure) ubuntu 20.04 focal fossa

~$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
3 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 python3-setuptools (45.2.0-1) ...
/var/lib/dpkg/info/python3-setuptools.postinst: 6: py3compile: not found
dpkg: error processing package python3-setuptools (--configure):
installed python3-setuptools package post-installation script subprocess returned error exit status 127
Setting up python3-wheel (0.34.2-1) ...
/var/lib/dpkg/info/python3-wheel.postinst: 6: py3compile: not found
dpkg: error processing package python3-wheel (--configure):
installed python3-wheel package post-installation script subprocess returned error exit status 127
dpkg: dependency problems prevent configuration of python3-pip:
python3-pip depends on python3-setuptools; however:
Package python3-setuptools is not configured yet.
python3-pip depends on python3-wheel; however:
Package python3-wheel is not configured yet.
dpkg: error processing package python3-pip (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
Errors were encountered while processing:
python3-setuptools
python3-wheel
python3-pip
E: Sub-process /usr/bin/dpkg returned an error code (1)

nodejs install issue in linux

sudo apt-get install nodejs
[sudo] password for akhil:
Reading package lists... Done
Building dependency tree
Reading state information... Done
nodejs is already the newest version (4.2.6~dfsg-1ubuntu4.1).
The following packages were automatically installed and are no longer required:
linux-headers-4.4.0-51 linux-headers-4.4.0-51-generic linux-headers-4.4.0-57 linux-headers-4.4.0-57-generic
linux-image-4.4.0-51-generic linux-image-4.4.0-57-generic linux-image-extra-4.4.0-51-generic linux-image-extra-4.4.0-57-generic
ubuntu-core-launcher
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 140 not upgraded.
2 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 python-gunicorn (19.4.5-1ubuntu1) ...
update-rc.d: error: initscript does not exist: /etc/init.d/gunicorn
dpkg: error processing package python-gunicorn (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of gunicorn:
gunicorn depends on python-gunicorn (= 19.4.5-1ubuntu1); however:
Package python-gunicorn is not configured yet.
dpkg: error processing package gunicorn (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
Errors were encountered while processing:
python-gunicorn
gunicorn
E: Sub-process /usr/bin/dpkg returned an error code (1)
I am trying to install nodejs on my system.But the above error occured.
I already installed gunicorn in my system.Please figureout what is the real issue?

Starting database: mongod failed

I fail to install mongodb on my server (ssh; linux-gnu). Get the following trace:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
mongodb-org-mongos mongodb-org-server mongodb-org-tools
The following NEW packages will be installed:
mongodb-org mongodb-org-mongos mongodb-org-server mongodb-org-tools
0 upgraded, 4 newly installed, 0 to remove and 47 not upgraded.
Need to get 0 B/46.7 MB of archives.
After this operation, 149 MB of additional disk space will be used.
Selecting previously deselected package mongodb-org-server.
(Reading database ... 73280 files and directories currently installed.)
Unpacking mongodb-org-server (from .../mongodb-org-server_3.0.5_amd64.deb) ...
Selecting previously deselected package mongodb-org-mongos.
Unpacking mongodb-org-mongos (from .../mongodb-org-mongos_3.0.5_amd64.deb) ...
Selecting previously deselected package mongodb-org-tools.
Unpacking mongodb-org-tools (from .../mongodb-org-tools_3.0.5_amd64.deb) ...
Selecting previously deselected package mongodb-org.
Unpacking mongodb-org (from .../mongodb-org_3.0.5_amd64.deb) ...
Processing triggers for man-db ...
Setting up mongodb-org-server (3.0.5) ...
Starting database: mongod failed!
invoke-rc.d: initscript mongod, action "start" failed.
dpkg: error processing mongodb-org-server (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up mongodb-org-mongos (3.0.5) ...
configured to not write apport reports
Setting up mongodb-org-tools (3.0.5) ...
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 mongodb-org (--configure):
dependency problems - leaving unconfigured
configured to not write apport reports
Errors were encountered while processing:
mongodb-org-server
mongodb-org
E: Sub-process /usr/bin/dpkg returned an error code (1)
I have been following instructions from official documentation.
I tried to repair it, but it didn't help.
mongod --repair
2015-08-03T09:11:28.456+0200 I STORAGE [initandlisten] exception in initAndListen: 29 Data directory /data/db not found., terminating
2015-08-03T09:11:28.456+0200 I CONTROL [initandlisten] dbexit: rc: 100
I was also trying to install locales, but it also didn't help.
How can I get around this and install mongodb? What can be the error?
After successfully installing MongoDB (via Homebrew) on Yosemite, these instructions were displayed:
To have launchd start mongodb at login:
ln -sfv /usr/local/opt/mongodb/*.plist ~/Library/LaunchAgents
Then to load mongodb now:
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mongodb.plist
Or, if you don't want/need launchctl, you can just run:
mongod --config /usr/local/etc/mongod.conf
"/usr/local/etc/mongod.conf" contains the "dbpath" argument. After reviewing that file I was also able to start MongoDB as follows:
$ mongod --dbpath /usr/local/var/mongodb
On a Linux environment your paths are probably different, but I hope this helps answer your question and provides you with some direction to solve your problem.

Error when sudo apt-get install php5-cli

I'm using linux mint. I'm trying to install php5-cli, but after execution a corresponding bash command I've the following log:
Reading package lists... Done
Building dependency tree
Reading state information... Done
php5-cli is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 353 not upgraded.
4 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
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
Setting up php5-common (5.4.6-1ubuntu1.5) ...
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
dpkg: error processing php5-common (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up man-db (2.6.3-1) ...
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
dpkg: error processing man-db (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of libapache2-mod-php5:
libapache2-mod-php5 depends on php5-common (= 5.4.6-1ubuntu1.5); however:
Package php5-common is not configured yet.
dpkg: error processing libapache2-mod-php5 (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php5-cli:
php5-cli depends on php5-common (= 5.4.6-1ubuntu1.5); however:
Package php5-common is not configured yet.
dpkg: error processing php5-cli (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
php5-common
man-db
libapache2-mod-php5
php5-cli
E: Sub-
process /usr/bin/dpkg returned an error code (1)
If I'm trying to execute sudo apt-get install man-db or sudo apt-get install libapache2-mod-php5 I have the same errors. Why it occurred?
I had this same error after symlinking the /etc/php5/cli/php.ini from /etc/php5/apache/php.ini
I deleted the symlink and then called
sudo apt-get -f install
all is good!
before above you should do
sudo mv /etc/php5/cli/php.ini /etc/php5/cli/php.bak

Resources