PHP 7 Module error on Ubuntu - ubuntu-14.04

Suddenly I got conflict php 7.0 on Ubuntu 14.04. php run in terminal but not in browser. When I try to re-install I frequently got error below :
Setting up libapache2-mod-php7.0 (7.0.6-13+donate.sury.org~trusty+1) ...
dpkg: error processing package libapache2-mod-php7.0 (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
libapache2-mod-php7.0
Moreover I un-installed and re-install apache2 server also but not able to resolve it.
Please note initially I ran command sudo apt-get update. After that I have all these issues. Kindly suggest how it will resolved. Thanks

Related

dpkg/systemd error: cp: '/etc/resolv.conf' and '/run/systemd/resolve/stub-resolv.conf' are the same file

I am trying to install this package software-properties-common on Ubuntu 20.04 and I'm facing the following problem:
cp: '/etc/resolv.conf' and '/run/systemd/resolve/stub-resolv.conf' are the same file
dpkg: error processing package systemd (--configure):
installed systemd package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
systemd
E: Sub-process /usr/bin/dpkg returned an error code (1)
Any idea how I could solve it?
I am considering deleting the /run/systemd/resolve/stub-resolv.conf but I am not sure this is a good idea and if it would solve the problem.
I removed /run/systemd/resolve/stub-resolv.conf and ran sudo apt-get -f install again and it solved the issue.

How do I fix broken dependencies if apt-get --fix-broken is giving me a "not known" error?

I've been attempting to install OpenLDAP on Ubuntu, but I keep receiving a dependency error whenever I try to install it.
The console output is:
dpkg: error processing package libapache2-mpm-itk (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of apache2-mpm-itk:
apache2-mpm-itk depends on libapache2-mpm-itk; however:
Package libapache2-mpm-itk is not configured yet.
dpkg: error processing package apache2-mpm-itk (--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:
libapache2-mpm-itk
apache2-mpm-itk
I tried running the code below to fix these errors:
sudo apt-get -f
But I received the error:
E: Command line option 'f' [from -f] is not known.
I have also tried to use the alternative --fix-broken, but I get the same error. Has anyone ever experience this and know a way around this?
First you'll have to resolve the problem with libapache2-mpm-itk. There isn't enough info in what you posted above to see why it's failing to install, but a quick workaround would be to just remove it:
sudo apt-get purge libapache2-mpm-itk apache2-mpm-itk
After that you should be able to install other packages again.
-f has to be used with an action, for example: sudo apt-get -f install (you don't need to provide any packages names when doing this.)
Whilst
sudo apt --fix-broken install
should work to repair damage. You might also find
sudo apt-get -f install
yeilds better result. Even though it's meant to be same.
You need to run sudo apt-get -f install NOT just sudo apt-get -f.

Installing sublime text 3 on AWS Ubuntu 14.04.1 LTS

Sublime-text is a fast editor for Windows and Linux. I failed to install sublime text 3 on AWS Ubuntu 14.04.1 LTS using the following commands:
sudo add-apt-repository ppa:webupd8team/sublime-text-3
sudo apt-get update
sudo apt-get install sublime-text-installer
Results in following error message:
p: cannot create regular file "/usr/share/icons/hicolor/16x16/apps/":
No such file or directory dpkg: error processing package sublime-text-installer (--configure):
subprocess installed post-installation script returned error exit status 1
I see following directories under /usr/share/icons/hicolor/
32
48
64
So, I created 16x16 subdirectory, but then it gives an error for 32x32 directory doesnot exist. Did anyone experience this problem before? I will appreciate any help.
sublime-text is a GUI application that needs a GTK installation. Your server is missing that dependency. (In a perfect world, it should be a dependency of the package of course.)
Install libgtk2 (as root):
apt-get install libgtk2.0-common
and then reinstall sublime-text, probably using:
apt-get purge sublime-text-installer ; apt-get install sublime-text-installer

MongoDB Fails to Upgrade on Linux Mint, Post-Installation Script Returned Error

So I ran into a fun little problem today with updating my instance of MongoDB using the package manager. Every time it tried to update, it would give me an error of E: mongodb-10gen: subprocess installed post-installation script returned error exit status 1
Everything else upgrades fine in the package manager.
The error was saying it wasn't able to sucessfully run the post-installation script; essentially it couldn't restart the database after it was upgraded. In my case, that's because the DB was already running. Shutting down and upgrading normally fixed my issue and allowed my package manager to fully upgrade.
mongo
use admin
db.runCommand('shutdown')
exit (after this you should be inside the shell)
sudo apt-get update
sudo apt-get upgrade
Voila, now your MongoDB install should be upgraded and running.

Why is MongoDB unable to create a user on Ubuntu 11.10 when installing?

I am installing MongoDB on my Ubuntu 11.10 machine. After adding the appropriate line to /etc/apt/sources.list (using instructions from here), I type the following to install:
sudo apt-get install mongodb-10gen
It results in the following output:
Adding system user `mongodb' (UID 117) ...
Adding new user `mongodb' (UID 117) with group `nogroup' ...
useradd: cannot lock /etc/passwd; try again later.
adduser: `/usr/sbin/useradd -d /home/mongodb -g nogroup -s /bin/false -u 117 mongodb' returned error code 1. Exiting.
dpkg: error processing mongodb-10gen (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
mongodb-10gen
E: Sub-process /usr/bin/dpkg returned an error code (1)
I only have other terminal windows open (none of them running any programs) and Chromium open. Why might the install not be able to add a user?
Thanks,
ParagonRG
Solution, thanks to 'Thomas', from the this resource:
Look for /etc/group.lock, /etc/passwd.lock, and /etc/shadow.lock, and remove them. Make sure you're ONLY removing these files if they exist.
After doing this, I simply re-ran the install command and it successfully completed.

Resources