when I tried this line " apt-get install php7.0-gd php7.0" I got below error :
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
libapache2-mod-php7.0 : Depends: apache2-api-20120211
Depends: apache2-bin but it is not going to be installed
Recommends: apache2 but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
Related
When I try to install apache, I have got the following error.
sudo apt-get install apache2
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:
apache2 : Depends: apache2-bin (= 2.4.18-2ubuntu3.13) but it is not going to be installed
Depends: apache2-utils (>= 2.4) but it is not going to be installed
Depends: apache2-data (= 2.4.18-2ubuntu3.13) but it is not going to be installed
Recommends: ssl-cert but it is not going to be installed
golang-1.6 : Depends: golang-1.6-go (>= 1.6.2-0ubuntu5~16.04.4) but it is not going to be installed
golang-1.6-doc : Depends: golang-1.6-go but it is not going to be installed
golang-go : Depends: golang-1.6-go but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
I have tried running
sudo apt-get update
This also did not fix the issue.
Can anyone help me to understand this problem?
Try:
sudo apt-get -f install apache2
I just removed golang completely.
sudo find /var/lib/apt/lists -type f |xargs rm -f >/dev/null
sudo dpkg --remove golang-go
This link was useful : https://askubuntu.com/questions/252777/how-can-i-resolve-dpkg-dependency
After this, I did update. Then apache2 got installed successfully.
Loaded: loaded (/etc/init.d/apache2; bad; vendor preset: enabled)
Drop-In: /lib/systemd/system/apache2.service.d
└─apache2-systemd.conf
Active: active (running) since Fri 2019-10-18 11:50:14 UTC; 2min 3s ago
Docs: man:systemd-sysv-generator(8)
CGroup: /system.slice/apache2.service
├─5661 /usr/sbin/apache2 -k start
├─5664 /usr/sbin/apache2 -k start
└─5665 /usr/sbin/apache2 -k start
Thanks for all the responses!!
I'm using Ubuntu16.04 and trying install a package named "nrt" through "apt-get install".
The output after running "sudo apt-get install nr" is as follows:
The following packages have unmet dependencies:
nrt : Depends: libboost1.48-all-dev but it is not installable
Depends: zeroc-ice34 but it is not installable
Depends: libzeroc-ice34-dev but it is not installable
E: Unable to correct problems, you have held broken packages.
I have managed to compile and install ice3.4.0. And I have added the corresponding paths to "PATH". However, it still complained that zeroc-ice34 is not installable.
The default boost version on my computer is 1.54 but "nrt" needs boost-1.48.
How can I deal with this problem? Is there some way to switch default boost version?
I have unmet dependencies for libapache2-mod-php7.0. In my attempt to fix this issue I have been playing around with my sources and have done a variety of upgrades. I was on Stretch when I started, I know I've probably gone about it the wrong way but I like to try before I ask.
lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux stable-updates (sid)
Release: stable-updates
Codename: sid
cat /etc/issue.net
Debian GNU/Linux buster/sid
cat /proc/version
Linux version 3.2.0-4-amd64 (debian-kernel#lists.debian.org) (gcc version 4.6.3 (Debian 4.6.3-14) ) #1 SMP Debian 3.2.93-1
apt-get update
apt-get updgrade
...
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
libapache2-mod-php7.0 : Depends: apache2-api-20120211
Depends: apache2-bin (>= 2.4.16) but it is not installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
apt --fix-broken install
...
dpkg: error processing archive /var/cache/apt/archives/apache2-bin_2.4.29-1_amd64.deb (--unpack):
trying to overwrite '/usr/lib/apache2/modules/httpd.exp', which is also in package apache2.2-bin 2.2.22-13+deb7u12
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/apache2-bin_2.4.29-1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
apt-get clean
apt-get autoclean
apt-get -f install
...
Unpacking apache2-bin (2.4.25-3+deb9u3) ...
dpkg: error processing archive /var/cache/apt/archives/apache2-bin_2.4.25-3+deb9u3_amd64.deb (--unpack):
trying to overwrite '/usr/lib/apache2/modules/httpd.exp', which is also in package apache2.2-bin 2.2.22-13+deb7u12
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/apache2-bin_2.4.25-3+deb9u3_amd64.deb
W: http: aptMethod::Configuration: could not load seccomp policy: Invalid argument
E: Sub-process /usr/bin/dpkg returned an error code (1)
dpkg --configure -a
dpkg: dependency problems prevent configuration of libapache2-mod-php7.0:
libapache2-mod-php7.0 depends on apache2-api-20120211; however:
Package apache2-api-20120211 is not installed.
libapache2-mod-php7.0 depends on apache2-bin (>= 2.4.16); however:
Package apache2-bin is not installed.
dpkg: error processing package libapache2-mod-php7.0 (--configure):
dependency problems - leaving unconfigured
Setting up linux-image-4.14.0-1-amd64 (4.14.2-1) ...
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-4.14.0-1-amd64
/etc/kernel/postinst.d/zz-update-grub:
/usr/sbin/grub-probe: error: failed to get canonical path of `/dev/disk/by-uuid/1cd988f1-4ed7-4bb1-81a5-15f7dc900a47'.
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 1
dpkg: error processing package linux-image-4.14.0-1-amd64 (--configure):
installed linux-image-4.14.0-1-amd64 package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of linux-image-amd64:
linux-image-amd64 depends on linux-image-4.14.0-1-amd64; however:
Package linux-image-4.14.0-1-amd64 is not configured yet.
dpkg: error processing package linux-image-amd64 (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php7.0:
php7.0 depends on libapache2-mod-php7.0 | php7.0-fpm | php7.0-cgi; however:
Package libapache2-mod-php7.0 is not configured yet.
Package php7.0-fpm is not installed.
Package php7.0-cgi is not installed.
dpkg: error processing package php7.0 (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php:
php depends on php7.0; however:
Package php7.0 is not configured yet.
dpkg: error processing package php (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of phpmyadmin:
phpmyadmin depends on php; however:
Package php is not configured yet.
Package php7.0 which provides php is not configured yet.
dpkg: error processing package phpmyadmin (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
libapache2-mod-php7.0
linux-image-4.14.0-1-amd64
linux-image-amd64
php7.0
php
phpmyadmin
apt-get -u dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
libapache2-mod-php7.0 : Depends: apache2-api-20120211
Depends: apache2-bin (>= 2.4.16) but it is not installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
What else can I try to resolve this?
you need to remove apache
apt-get remove apache2.2-bin
you can force the installation of apache2-bin:
dpkg -i --force-overwrite /var/cache/apt/archives/apache2-bin_2.4.20-2_amd64.deb
and then try
apt-get -f install
for me it worked ;)
Try these steps
1. sudo apt-get update
2. sudo apt-get dist-upgrade
3. apt-get install -f --reinstall apache2
-f to fix unmet dependencies.
I executed following commands to load passenger module:
sudo sh -c 'echo deb https://oss-binaries.phusionpassenger.com/apt/passenger jessie main > /etc/apt/sources.list.d/passenger.list'
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install apache2 libapache2-mod-passenger
I got following errors:
The following packages have unmet dependencies:
libapache2-mod-passenger : Depends: libstdc++6 (>= 4.9) but 4.7.2-2ubuntu1 is to be installed
Depends: apache2-api-20120211 but it is not installable
Depends: passenger (= 1:5.0.26-1~jessie1) but it is not going to be installed
How to fix these errors?
Trying to install libgdal-dev. The purpose is for use with liblas. Here is my attempt.
sudo apt-get install libgdal-dev ----> libgdal-dev : Depends: libdap-dev but it is not going to be installed
sudo apt-get install libdap-dev -----> libdap-dev : Depends: libxml2-dev but it is not going to be installed
sudo apt-get install libxml2-dev ----> libxml2-dev : Depends: libxml2 (= 2.8.0+dfsg1-5ubuntu2.1) but 2.8.0+dfsg1-5ubuntu2.2~precise1 is to be installed
Can't locate anything in synaptic relevant to the solution. seems like i might need to sudo udpate && sudo upgrade, which hasn't changed anything.
What should i do?
I have experienced this issue after upgrading from Ubuntu precise (12.04) to quantal (12.10). I believe something went wrong during the upgrade of libxml2, and the old version remained.
The way you can solve it is by downloading a newer build of libxml2 from the Quantal's lauchpad repositoring and installing it manually. Choose a build for your system, and install using:
sudo dpkg -i libxml2_2.8.0+dfsg1-5ubuntu2.1_amd64.deb
I couldn't solve it using apt-get/aptitude, as they seemed to detected the precise version as the latest.