I wanted to remove and reinstall python2.7 interpreter on 12.04
But when I did sudo apt-get remove python2.7, The crazy terminal started to remove everything!!! Any idea how I can restore whatever I've removed?
|
I wanted to remove and reinstall python2.7 interpreter on 12.04 But when I did |
||||
|
While reinstalling Ubuntu is probably the easiest way, it's worth pointing out that it's possible to recover without reinstalling everything. To do this, manually download the In the future, if you need to reinstall a package, instead use
or
which reinstalls the package without having to remove the dependencies. |
|||||
|
|
Removing Python is not a good idea as much of Ubuntu depends on it. You may have seen a warning telling you which packages depend on python and thus will be removed with Python. When proceeding you end up with a quite stripped down OS. Reinstalling Ubuntu would now be the easiest and safest way to get it back. Take care not to delete your HOME when you do so. |
|||||||||||||||||||||
|
|
If it's not too late for anyone, or if you have come across this problem lately, this is how I got it running: I followed Mechanical snail's advice and downloaded all the packages using Synaptic. I selected all the relevant packages, basically everything with "python", "python2", "python3", "apt", "python-apt", etc., that was already installed in my computer, tagged them for reinstallation, and when I hit apply, I made sure I downloaded them only. Then, under root, I went into the
Anyway, I was getting this Running the script outside of Aptana by calling |
|||||
|
|
I also had the same problem. And I was able to fix it going to ctrl+alt+f1, logged in with my username and password then:
And it reinstalled most (if not all) the deleted files (along with unity and terminal) :D |
|||||||||
|
|
You need to execute this: |
|||||||||||||
|
|
|
|||
|
|
|
During un-installation of Python, I abruptly closed the terminal. Hence Python was partially removed. I fixed it with the following commands
|
|||
|
|
|
In a fit of senseless haste I removed python 2.7 and it removed a lot of packages that were dependent on it. I could not even launch terminal. I dropped to tty1 and did what Lois Mari Ang Laput suggested
I got back the desktop and could launch terminal. Packages like shutter, mysql-workbench, that were removed needed to be reinstalled. I checked the history in /var/log/apt and reinstalled all packages that were removed. |
|||
|
|
|
you can recover using live CD using |
||||
|
|
apt/aptitudedoes not depends on python.aptjust suggests python. Honestly, I was in doubt about that so I tried U12.04 in VBox, uninstalled python2.7 as you did, reboot, unable to login, switch to tty6, I was able reinstall gedit (dep on python) using apt-get, even aptitude is working well.apt-get install ubuntu-desktopshould solve such case. Probably, apt got into unclean state after uninstalling python2.7 was interrupted. Could you post the output/errors you got when runningsudo apt-get install python2.7– user.dz Oct 4 '14 at 15:17