HOWTO Recuperar de "emerge --unmerge gcc"
De Gentoo Linux Wiki
| Kernel & Hardware • Red y Servicios • Portage • Relacionado con el Sistema • Servidor X • Juegos • Misceláneos |
[editar] Introducción
Después de realizar una equivocación tan tonta en la que has incurrido, ésta es una ayuda de cómo consigues el GCC de nuevo en tu sistema.
GCC: compilador usado en muchos sistemas basados en *nix y *BSD en todo el mundo, es uno de los componentes más básicos de tu sistema, te permite compilar e instalar programas nuevos a partir del código fuente.
[editar] Paso 1 - Obteniendo el paquete binario
Obten un paquete binario desde
- x86 users http://dev.gentoo.org/~avenj/bins/
- AMD64 users http://dev.gentoo.org/~azarah/bins/
[editar] Paso 2 - Extrayendo
Después de descargarlo, vaya al directorio donde usted descargó el paquete binario y desde la consola como usuario administrador ingrese
| Código: Extrayendo el binario |
tar -xvjf gcc-3.X.X-rX.tbz2 -C / |
( leave the -j out with a ".tar" )
[editar] Paso 3 - Viendo la lista de compiladores
Para ver el listado de los gcc instalados tipea:
| Código: Configurando GCC |
gcc-config -l |
Lo anterior te devolverá algo parecido a esto:
[1] i386-pc-linux-gnu-3.3.4 * [2] i686-pc-linux-gnu-3.4.3 [3] i686-pc-linux-gnu-3.4.3-hardened [4] i686-pc-linux-gnu-3.4.3-hardenednopie [5] i686-pc-linux-gnu-3.4.3-hardenednossp
[editar] Paso 4 - Seleccionando el compilador
Cambia el perfil con el siguiente comando, en lugar del nombre puedes usar su número. Elije la versión que has descomprimido, por ejemplo:
| Código: Selecciona la versión extraída |
gcc-config i686-pc-linux-gnu-3.X.X |
[editar] Paso 5 - Configurando las variables del perfil
La siguiente instrucción configurará el perfil para utilizar el gcc seleccionado.
| Código: Actualizando el perfil |
source /etc/profile |
Nota: El comando anterior, solamente actualiza las variables en la terminal actual y las nuevas consolas. Conociendo esto necesitará ejecutar "source /etc/profile" en cada terminal no configurada.
Para verificar el cambio teclea nuevamente:
| Código: Verificando GCC |
gcc-config -l |
Lo cual debe devolverte el listado con el * en la versión seleccionada:
[1] i386-pc-linux-gnu-3.3.4 [2] i686-pc-linux-gnu-3.4.3 * [3] i686-pc-linux-gnu-3.4.3-hardened [4] i686-pc-linux-gnu-3.4.3-hardenednopie [5] i686-pc-linux-gnu-3.4.3-hardenednossp
[editar] Paso 6 - Para el futuro
No haga esto de nuevo ;)
[editar] "Yo hice esto" Salón de la vergüenza
- Lord Sauron (lordsauronthegreat (at) gmail (dot) com) "I can't believe I just did that!"
- LouDawg - after years of using Gentoo without any fatal mistakes, I must've been drugged to have done such a stupid thing :-)
- I didn't do this, but some how killed my compiler (maybe through prune). Still helpful.
- Terrestrial Host - .....I'm such a fool...thankfully there are those out there who cover for us.
- Wiz - Newbie. was trying out different things with portage. :)) guess this was the one thing I shouldn't have tried.
- jmpnz - Hmm I guess an assembler would be nice to have.
- Viaken - Through some careless by-hand rsyncing, I not only lost gcc, but wiped my entire /usr directory. Fun times. :)
- Buddy - Just wanted to remove the last version, but accidently unemerged all :-(
- David H. - Thought I was cleaning older versions of GCC left on my system, ignored the huge red warning, b0rked my system, recovered, and learned from it.
- Tune - 5 4 3 2 1... Yikes! Did I just do what I think I did?! Thanks for getting me on the road again
- UT -Yup add me to the wall, it was stupid and get me a heart attack but this wki really got me on the road again!
- Figueiro. M. - Traduje este tutorial como recordatorio de los errores recurrentes luego de cometerlos sistemáticamente. A ver si aprendo de mi mismo.
Referencia para todos los novatos: Cosas que no se deben desemerger: http://forums.gentoo.org/viewtopic-t-33609.html
[editar] No network? No glibc either? (Can't run commands and machine won't boot?)
This procedure, using a Gentoo boot CD, rescued a system where both gcc AND glibc had been unmerge'd. (Not by me, I swear!)
[editar] Créditos
Traducción realizada por Mariano Figueiro sobre la versión original en Ingles y agregados del otros artículos como Migrar a gcc... o Variables de entorno.
