Depends: openjdk-7-jre-headless (= 7u75-2.5.4-1~deb7u1) but it is not going to be installed - apt

i want to install Openjdk but i get this error :
root#debian~# apt-get install openjdk-7-jdk
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
openjdk-7-jdk : Depends: openjdk-7-jre (= 7u75-2.5.4-1~deb7u1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
i try this commands by my issue still not solved :
sudo apt-get install -f
sudo dpkg --configure -a
sudo apt-get clean
sudo apt-get update
how should i fix this ?

try
sudo apt-get install tzdata=2014j-0wheezy1
sudo apt-get install openjdk-7-jdk

Related

apt-get is broken and can't install anything

My apt-get is totally broken and can't install anything. The output of 'apt-get install -f" is as follows:
# apt-get install -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... failed.
The following packages have unmet dependencies:
gnome-icon-theme : Depends: gtk-update-icon-cache
python3-cairo : Depends: python3 (>= 3.6~) but 3.4.3-1 is installed
python3-gdbm : Depends: python3 (>= 3.6) but 3.4.3-1 is installed
python3-reportlab-accel : Depends: python3 (>= 3.6~) but 3.4.3-1 is installed
rhythmbox : Depends: rhythmbox-data (= 3.1-1ubuntu3) but 3.4.1-2ubuntu5 is installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies
The output of 'sudo apt install python3' is in the picture:https://imgur.com/a/IbGK0
I have Googled any possible questions and tried any possible solutions but NO ONE worked for it.
Go to /var/log/dist-upgrade/apt.log and identify the packages that are broken. "apt-get remove" the packages, do release upgrade and then you should be able to reinstall them.
You can find more information here: https://askubuntu.com/questions/124845/eerror-pkgproblemresolverresolve-generated-breaks-this-may-be-caused-by-hel
This command resolved my error
sudo apt -f install
In my case I was behind a proxy, so I needed to run the following command:
sudo nano /etc/apt/apt.conf
And added the following lines:
Acquire::http::proxy "http://<user>:<password>#<proxy_host>:<proxy_port>/";
Acquire::https::proxy "https://<user>:<password>#<proxy_host>:<proxy_port>/";
Acquire::ftp::proxy "ftp://<user>:<password>#<proxy_host>:<proxy_port>/";

Maven install fails on ubuntu due to broken packages

I am trying to install maven but getting error for broken packages. I tried with -f switch too but it did not helped.
simon#simon-pc:~$ sudo apt-get install -f maven
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
maven : Depends: libaether-java but it is not going to be installed
Depends: libplexus-containers1.5-java but it is not going to be installed
Depends: libsisu-ioc-java but it is not going to be installed
Depends: libwagon-java but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Try the following commands:
#sudo apt-get remove maven2
sudo add-apt-repository "deb http://ppa.launchpad.net/natecarlson/maven3/ubuntu precise main"
sudo apt-get update
sudo apt-get install maven3
If you encounter this:
The program 'mvn' can be found in the following packages:
maven
maven2
Try sudo apt-get install {selected-package}
#Just add those lines in /etc/profile
export M2_HOME=/usr/share/maven3
export M2=$M2_HOME/bin
export PATH=$M2:$PATH

Maven Installation in linux fails with "The following packages have unmet dependencies" error

I am new to Linux I was trying to install Maven with
sudo apt-get install maven
I hit upon this error
Do you want to continue? [Y/n] Y
Get:1 http://ubuntu.excellmedia.net/archive/ utopic-updates/main openjdk-7-jre-headless amd64 7u75-2.5.4-1~utopic1 [39.7 MB]
Fetched 1,031 B in 0s (7,897 B/s)
E: Failed to fetch http://ubuntu.excellmedia.net/archive/pool/main/o/openjdk-7/openjdk-7-jre-headless_7u75-2.5.4-1~utopic1_amd64.deb Size mismatch
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
On googling i found out that I had to do
sudo apt-get clean
sudo apt-get autoclean
sudo apt-get autoremove
and followed that
Now after doing above clean I tried installing again with
sudo apt-get install maven
but now i am getting the following different error :-(
The following packages have unmet dependencies:
maven : Depends: libaether-java but it is not going to be installed
Depends: libplexus-containers1.5-java but it is not going to be installed
Depends: libsisu-ioc-java but it is not going to be installed
Depends: libwagon2-java (>= 2.2-2) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
ubuntu#ubuntu:~$
I tired
sudo apt-get update
but it dint work I am currently using "Ubuntu 14.10".
Plz help
Try this out:
sudo apt-get -f install
This will cause apt to scan and fix missing dependencies and fix them from the repositories configured for your system. Try installing maven again after this.

Installing Opencpu via apt-get install, not working

I just ran an apt-get install, and this is the output I get.
$ sudo apt-get install opencpu
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package opencpu
Anybody else run into problems installing opencpu in Ubuntu 14.04 (LTS)?
You need to add the opencpu-1.5 ppa repository first:
sudo add-apt-repository ppa:opencpu/opencpu-1.5
sudo apt-get update
sudo apt-get install opencpu
Have a look at the server manual for more detailed instructions.

How to install node-sqlserver

I have tried apt-get install aptitude but i got this:
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:
aptitude : Depends: libboost-iostreams1.42.0 (>= 1.42.0-1) but it is not going to be installed
Depends: libcwidget3 but it is not going to be installed
Recommends: libparse-debianchangelog-perl but it is not going to be installed
phpmyadmin : Depends: php5-mysql but it is not going to be installed or
php5-mysqli but it is not installable
Recommends: mysql-client
E: Unmet dependencies. Try 'apt-get -f instal
Can anyone suggest me how to resolve it?
Did you what apt-get suggested and performed
root# apt-get -f install ?
What about your /etc/apt/sources.list file? Is it up-to-date?

Resources