package list - linux mint - linux

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

Related

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

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.

"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.

Can't install mono-gmcs package

I am trying to install the mono-gmcs package on my virtual machine running Kali Linux, but receive the output
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:
mono-gmcs : Depends: mono-mcs (= 3.12.1-0xamarin1) but 4.0.4.1-0xamarin1 is to be installed
E: Unable to correct problems, you have held broken packages.
I am using the command sudo apt-get install mono-gmcs to install it.
It says, that mono-gmcs depends on mono-mcs (3.12.1-0xamarin1), which currently is installed via 4.0.4.1-0xamarin1. You have versions conflict. Downgrading xamarin will solve it sudo apt-get install packagename=version
If you are going to choose Mono 4.* via mono-complete, say goodbye to many old packages such as this one. They are obsolete and you don't need them any more.
The compilers have been unified to a single mcs.
Try this
sudo apt-get install mono-complete=*
It brings the latest version.

UBUNTU 14.04 64BIT can not install lib32stdc++6

I want install a 32bit application,but i can not install lib32stdc++6
here is:
sudo apt-get install lib32stdc++6
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:
lib32stdc++6 : Depends: gcc-4.8-base (= 4.8.2-19ubuntu1) but 4.8.4-2ubuntu1~14.04 is to be installed
E: Unable to correct problems, you have held broken packages.
finally,i found this
https://askubuntu.com/questions/223237/unable-to-correct-problems-you-have-held-broken-packages
and i use aptitude to force install this
sudo aptitude -f install lib32stdc++6
run this command ,and choose 'n',then it will give you another choice,then choose 'Y'.
done and success

Resources