I have two python in my computer 2.7 and 3.4. I stupidly assumed that 2.7 is the default python in ubuntu and tried to uninstall python3 using this command
sudo apt-get remove python3
While in the middle of the process I saw it removing firefox and other necessary tools, so I panicked and closed the process in the middle. But after restarting my computer I saw that it broke my ubuntu epecially my desktop. Then I have to painstakingly re installed the ubuntu desktop using these codes
#sudo apt-get and sudo dpkg --configure -a these two not working
sudo apt-get -f install ubuntu-desktop
#after installation
mv ~/.config/dconf/user ~/.config/dconf/user.old
#reboot
sudo reboot
This allowed me to regain my access to the desktop and launcher but when I tried to install other softwares using command line I am getting this error(used both apt-get install
and apt-get -f install)
and also unable to install from Ubuntu software center.
sudo apt-get install unity-tweak-tool
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:
friends-dispatcher : Depends: python3-pkg-resources but it is not going to be installed
python3-aptdaemon : Depends: python3-pkg-resources but it is not going to be installed
python3-chardet : Depends: python3-pkg-resources but it is not going to be installed
python3-plainbox : Depends: python3-pkg-resources but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
what should I do now? Can I uninstall python 2.7 from my system without harming it? How I install other softwares using command line (eg unity-tweak-tool)?
EDIT
Still after more than 10 hours of searching and teaking the system the problem still exists. Now I have narrowed it to a single problem.
When I tried this
sudo apt-get -f install
the error was pointing to a half installed python3-pkg-resources
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 41 not upgraded.
1 not fully installed or removed.
Need to get 0 B/31.7 kB of archives.
After this operation, 0 B of additional disk space will be used.
dpkg: error processing package python3-pkg-resources (--configure):
package python3-pkg-resources is not ready for configuration
cannot configure (current status `half-installed')
E: Sub-process /usr/bin/dpkg returned an error code (1)
Currently my autoremove dosent work and clean and autoclean return no error. Should I remove python3-pkg-resources? How should I do it and reinstall it?
EDIT2
Searching for solution to fix broken package lead to this answer which recommended removing broken packages using synaptic(which i installed before the problem).
The synaptic package manager shows four broken packages
I then selected a single package python3-plainbox
and marked as for removal which then again showed other packages depending on this package
the other three broken packages also show some varied packages depending on them. I tried to re install the broken packages using synaptic manager but its throwing error. Should I remove it
apt-cache policy python3-pkg-resources
say? – Byte Commander Jul 19 '16 at 08:28python3-pkg-resources: Installed: 3.3-1ubuntu2 Candidate: 3.3-1ubuntu2....
this is the result – Eka Jul 19 '16 at 10:27sudo apt-get install -f
should fix it... – Byte Commander Jul 19 '16 at 10:36sudo apt-get install -f python3
getting the same errorThe following packages have unmet dependencies: friends-dispatcher : Depends: python3-pkg-resources but it is not going to be installed python3-aptdaemon : Depends: python3-pkg-resources but it is not going to be installed python3-chardet : Depends: python3-pkg-resources but it is not going to be installed python3-plainbox : Depends: python3-pkg-resources but it is not going to be installed E: Unmet dependencies.
– Eka Jul 19 '16 at 10:39