Error installing vagrant - Sudo apt-get install Vagrant returns error: packages have unmet dependencies - Ubuntu 19.04 - linux

I am trying to run MiniKF on my device which requires me to install vagrant. I am running Ubuntu 19.04. I downloaded vagrant, but when I try to install it using sudo apt-get install vagrant I get the following message:
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:
vagrant : Depends: bsdtar but it is not going to be installed
Depends: ruby-net-scp (>= 1.1.0) but it is not going to be installed
Depends: ruby-net-sftp but it is not going to be installed
Depends: ruby-net-ssh (>= 1:2.6.6) but it is not going to be installed
Recommends: vagrant-libvirt but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
I have tried using sudo apt-get update , sudo apt-get install -f , tried editing the /var/lib/dpkg/status file, tried removing the files with sudo apt-get remove and more but nothing is working for me. Any ideas would be greatly appreciated.

So some very elementary things to try first:
sudo apt clean && sudo apt --fix-missing && sudo dpkg --configure -a
This is all pretty standard stuff to try first - this would attempt to clean any leftover resources and cache materials, then attempt to fix any broken or missing dependencies, then check for any unfinished or otherwise weird installation issues for other packages that didn't configure themselves all the way / correctly.
After that, if you still have the same issue, I'm assuming it's due to the fact that Ubuntu 19.04 is already end of life, and the repositories may not (read: definitely do not) have all the same packages that something that is within life like Ubuntu 20.04 has. Even if the above happens to fix your problem, you should look into upgrading to 20.04 whenever possible, as this won't be your first problem that crops up regarding updates or installation in the near future.

Related

Unable to install update-notifier-common on Debian Stretch

I'm currently trying to install some fonts on Debian Stretch
g#i-3-nstance:~$ sudo apt-get install ttf-mscorefonts-installer
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:
ttf-mscorefonts-installer : Depends: update-notifier-common (>= 0.119ubuntu2) but it is not installable
E: Unable to correct problems, you have held broken packages.
g#i-3-nstance:~$
...but it seems this package has been removed.
https://github.com/plone/ansible-playbook/issues/98
https://github.com/jnv/ansible-role-unattended-upgrades/issues/6#issuecomment-93569818
Is there a work-around?
Update: I did a manual install based on this: https://askubuntu.com/a/861476
sudo apt-get install cabextract libmspack0
wget http://ftp.de.debian.org/debian/pool/contrib/m/msttcorefonts/ttf-mscorefonts-installer_3.6_all.deb
sudo dpkg -i ttf-mscorefonts-installer_3.6_all.deb
The ttf-mscorefonts-installer package that apt-get tries to install is from Ubuntu repository, not from Debian repository (note that it depends on update-notifier-common >= 0.119ubuntu2).
You probably have mixed Debian and Ubuntu repositories in /etc/apt/sources.list.

PhpStorm Installation issue on Ubuntu 14.04

I am back here again with one more issue that I am having installing PhpStorm on my Ubuntu 14.04. To do so I followed the following steps:
Step 1. sudo apt-get purge openjdk* which gave me a long list mostly saying Package is not installed, so not removed. A few examples:
Package 'openjdk-7-dbg' is not installed, so not removed
Package 'openjdk-7-doc' is not installed, so not removed
...
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
Step 2: sudo add-apt-repository ppa:webupd8team/java which ended up saying this:
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:
oracle-java7-set-default : Depends: oracle-java7-installer but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Step 3: Despite those error messages popped up I went ahead and ran sudo apt-get update which executed OK.
Step 4: Tried to run sudo apt-get install oracle-java7-installer which again popped up a lot of negative remarks!
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:
oracle-java7-installer : Depends: java-common (>= 0.24) but it is not installable
Recommends: gsfonts-x11 but it is not installable
E: Unable to correct problems, you have held broken packages.
So I did not go further with rest of the following commands:
sudo apt-get install oracle-java7-set-default
wget http://download-cf.jetbrains.com/webide/PhpStorm-7.1.3.tar.gz
tar -xvf PhpStorm-7.1.3.tar.gz
cd PhpStorm-133.982/bin
./phpstorm.sh
I have no idea what is going wrong! Somebody please help this absolute newbie to install it.
On another note, if PhpStorm fails to install somehow on my PC, please suggest me a good software which runs on Ubuntu with an inbuilt SASS compiler so that I do not have to run a command every time from terminal? And it would be even better if that software I can get for free! PhpStorm is only a 30-day trial.
EDIT
Strange, I'm using PhpStarm on Ubuntu 14.04 and ant works fine. IntelliJ IDEs are really great.
I have these Java from the same repo you are using.
java-common-0.51
java-wrappers-0.1.27
oracle-java7-installer-7u80+7u60arm-0~webupd8~1
Let's try to purge all the Java packages from you system and then install the Oracle Java again.
Use dpkg -l | grep java to discover all the installed java-related packages.
Then, use apt-get purge on all of them.
Skip the javascipt packages of course.
Then, try to install oracle-java7-installer again. I hope it will be installed correctly.
To install Phpstorm in Ubuntu just follow these steps
1.Run sudo apt install snapd
2.Then sudo snap install phpstorm --classic
3.Then type phpstorm in shell and press enter to launch Phpstorm
Read more about these here

"Broken packages" do not let me install packages

I'm having some problems trying to setup a mjpg-streamer in my raspberry pi running raspbian. When I was trying to install the package, the following error was appearing:
sudo apt-get install libjpeg-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'libjpeg8-dev' instead of 'libjpeg-dev'
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:
libjpeg8-dev : Depends: libjpeg8 (= 8d-1+deb7u1) but 8d1-2 is to be installed
E: Unable to correct problems, you have held broken packages.
I've looked a lot of suggestions on google, and tried things like apt-get update and dpkg --get-selections | grep hold (nothing shows up). I really tried a lot of stuff, with no luck.
Do anyone have any suggestion on what to do?
Thanks everyone
As been said, it is a dependency problem, to solve it you can use aptitude.
To install aptitude:
sudo apt-get install aptitude
To use aptitude:
sudo aptitude install package_name-normaly_dev

Cannot install g++ on ubuntu 14.04.4 LTS (I have tried commands and software center)

I cannot install g++ on newly installed ubuntu 14.04.4 LTS.
When I use command sudo apt-get install g++, the terminal tell me:
cluster#cluster0-vm:~$ sudo apt-get install g++
[sudo] password for cluster:
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:
g++ : Depends: g++-4.8 (>= 4.8.2-5~) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
I changed the source, and tried again, failed too.
cluster#cluster0-vm:~$ sudo apt-get install g++
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:
g++:i386 : Depends: cpp:i386 (>= 4:4.7.3-1ubuntu10) but it is not going to be installed
Depends: gcc:i386 (>= 4:4.7.3-1ubuntu10) but it is not going to be installed
Depends: g++-4.7:i386 (>= 4.7.3-1~) but it is not going to be installed
Depends: gcc-4.7:i386 (>= 4.7.3-1~) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
I used the ubuntu software center to install g++, failed again......
Figure: Use ubuntu software center to install g++
This problem has been solved by changing another source.
I have tried 4 sources, and all of them have problems......OMG!
I think this will help:
sudo apt-get update
sudo apt-get -f install
sudo dpkg --configure -a
sudo apt-get clean
sudo apt-get install g++
Also this could help:
sudo dpkg --purge g++# Try this first
sudo dpkg --purge --force-depends g++# Try this ONLY if the previous line fails
sudo apt-get clean g++# Remove g++ from the cache
sudo apt-get install g++# Download and install the appropriate version of g++
If I had to guess, I would say there are other libc6, libc-dev, etc..files that need updating before you can update the C's and G's.
It seems that if you install build essentials then it will correct the problem.
If you look up the files on the ubuntu packages site and look at the dependencies, then compare them to what is on your machine, I bet you find you have an update conflict due to incompatible dependency version somewhere.
You could manually download them individually at the bottom of the repository page (a small table) then double click the deb files and they will start to install if all of the dependencies and versions are met and compatible.
Think of it as "A depends on B which depends on C which depends on D......" being installed. to some infinity no avail. Its a nightmare when doing it that way. But does force you to respect Synaptic and the apt-get thorough and detailed process and compatibility check.
Best to start with build essentials though.

package list - linux mint

when i was trying to fix an error in my linux mint, i accidentally, removed package list, now i can't install anything, how can i fix this?
i a beginner with linux..
i'm using linux mint 16 petra Mate edition.
follows the log:
charles#charles /etc/apt $ sudo apt-get install ubuntu-tweak
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:
ubuntu-tweak : Depends: python-compizconfig but it is not installable
E: Unable to correct problems, you have held broken packages.
How did you remove your package list? You should be able to restore it by finding the official repository list on the Linux Mint site, and then making sure your /etc/apt/sources.list.d/official-package-repositories.list matches what they have.
Firstly, I would run sudo apt-get update though, in order to see what you're missing. That in itself might fix your problem.
Try the following.
sudo add-apt-repository ppa:tualatrix/ppa
sudo apt-get update
sudo apt-get install ubuntu-tweak

Resources