0

Hello: would like to know what happened to my computer and I wrote from the terminal

sudo remove python2.7

And many applications were erased startup and delete the terminal, so try restarting my computer to see if recovered and so now I try to access my account and enter my password nothing happens.

Then I went to restart and enter root mode, then try to install what was erased trying to update with the command:

sudo update

But it appeared that the command does not exist, please help. I'm using ubuntu 12.04


Spanish version:

Hola: quisiera saber que pasó con mi computadora ya que escribí el comando desde la terminal:

sudo remove python2.7

Y se borraron muchas aplicaciones se borró el inicio y la terminal,por lo que intente reiniciando mi computadora para ver si se recuperaba y entonces ahora que trato de acceder en mi cuenta introduzco mi contraseña y no pasa nada.

Después volví a reiniciar y entre en modo root, ahí trate de instalar lo que se había borrado tratando de actualizar con el comando:

 sudo update 

Pero me aparecía que dicho comando no existe, por favor ayuda. Estoy usando ubuntu 12.04

kyodake
  • 15,401

3 Answers3

0
sudo apt-get install python

Do sudo apt-get install for the other packages that you want to reinstall.

riotejas
  • 976
  • 6
  • 10
0

Don't worry, you just removed the Python interpreter which is needed by some applications, including many system components; some of those components may have been removed to respect the dependency tree. This is a very common mistake.
We can try to solve the problem before a re-installation.
Backup your data before proceeding (you can install and use Midnight Commander "mc" to have easy life).
From a terminal (xTerm or the fullscreen Virtual Terminal are both fine) execute those commands in order:

  1. sudo apt-get install python python2.7 python2.7-dev
  2. sudo apt-get install aptitude
  3. sudo aptitude update
  4. sudo aptitude upgrade
  5. sudo aptitude -f

From the Aptitude's Curses GUI (the console graphics) install any missing package.
Some of those command may be redundant, but I don't know the state of your system.

Please, feel free to make any question by commenting under here and don't forget to press the UP arrow on the left if I'm of any help.
Good luck.

0

Switch on your computer.

Wait until the BIOS has finished loading.

Press and hold the Shift key, which will bring up the Gnu Grub menu.

Select the line which starts with Advanced options.

Select the line ending with recovery mode,something like:

Ubuntu GNU/Linux, with Linux 3.16.0-25-generic (recovery mode)

Press enter and your machine will begin the boot process.

Your PC display a menu with a number of options.

Select of the options will be, Network - Drop to root shell prompt.

You boot in a terminal, run the commands

sudo -i
mount -o remount,rw /
mount --all
apt-get update
apt-get install --reinstall python python-apt python-apt-common python-aptdaemon python-dbus python-dbus-dev python-debian python-defer python-jinja2 python-lxml
apt-get -f install

Spanish:

Inicia en modo recuperación (ya lo haz hecho).

En el submenu selecciona en este orden las opciones:

network
root

Iniciarás en una terminal, ejecuta en ella los siguientes comandos:

sudo -i
mount -o remount,rw /
mount --all
apt-get update
apt-get install --reinstall python python-apt python-apt-common python-aptdaemon python-dbus python-dbus-dev python-debian python-defer python-jinja2 python-lxml
apt-get -f install

Python es parte integrante de Ubuntu, jamás debes desinstalarlo, si necesitas otras versiones puedes instalarlas conjuntamente.

kyodake
  • 15,401