Anteriormente demostré cómo encontrar e instalar paquetes en versiones obsoletas de Red Hat Linux. Esta vez es el turno de Debian. ¿Cómo instalar paquetes en una distribución que no tiene soporte desde hace años?



Es común encontrar servidores corriendo versiones de sistemas operativos y software totalmente obsoletas. Es el clásico "eso no se toca". No pregunten por qué, ya lo sabrán ustedes. Y si no lo saben o no me creen, hablen con cualquier SysAdmin. Pasen por el artículo Dónde y cómo encontrar paquetes para versiones obsoletas de GNU/Linux y lean la catarsis.

Debian Wheezy (versión 7) fue liberada en 2013 y su soporte extendido (LTS) finalizó en mayo de 2018. No hace mucho tiempo a decir verdad, pero es cierto que lleva más de 1 año sin soporte. Es altamente recomendable pasar de manera urgente a una versión posterior como Debian 10, o por qué no mejor Devuan ASCII.

Sin embargo este es uno de esos casos de "eso no se toca" y no se puede migrar aún. Pero, algo ha fallado y necesito arreglarlo instalado un paquete.

El problema es que, al finalizar el soporte, el repositorio ha pasado al archivo de Debian, y al ejecutar apt-get update se hace evidente:

root@debian7:~# apt-get update
Ign http://ftp.debian.org wheezy Release.gpg                                         
Ign http://ftp.debian.org wheezy-backports Release.gpg                               
Ign http://security.debian.org wheezy/updates Release.gpg        
Ign http://http.debian.net wheezy-backports Release.gpg          
Ign http://ftp.debian.org wheezy Release       
Ign http://http.debian.net wheezy-backports Release
Ign http://ftp.debian.org wheezy-backports Release
Ign http://security.debian.org wheezy/updates Release
Ign http://security.debian.org wheezy/updates/main amd64 Packages/DiffIndex
Ign http://security.debian.org wheezy/updates/contrib amd64 Packages/DiffIndex            
Ign http://ftp.debian.org wheezy/main amd64 Packages/DiffIndex                             
Ign http://http.debian.net wheezy-backports/main amd64 Packages/DiffIndex
Ign http://ftp.debian.org wheezy/contrib amd64 Packages/DiffIndex                          
Ign http://http.debian.net wheezy-backports/main i386 Packages/DiffIndex                   
Ign http://ftp.debian.org wheezy/non-free amd64 Packages/DiffIndex                                               
Ign http://ftp.debian.org wheezy/main i386 Packages/DiffIndex                              
Ign http://security.debian.org wheezy/updates/non-free amd64 Packages/DiffIndex
Ign http://security.debian.org wheezy/updates/main i386 Packages/DiffIndex
Ign http://security.debian.org wheezy/updates/contrib i386 Packages/DiffIndex              
Ign http://ftp.debian.org wheezy/contrib i386 Packages/DiffIndex                           
Err http://http.debian.net wheezy-backports/main amd64 Packages                            
  
Ign http://ftp.debian.org wheezy/non-free i386 Packages/DiffIndex                          
Ign http://security.debian.org wheezy/updates/non-free i386 Packages/DiffIndex
Err http://http.debian.net wheezy-backports/main i386 Packages       
  
Err http://security.debian.org wheezy/updates/non-free amd64 Packages                      
  
Err http://http.debian.net wheezy-backports/main amd64 Packages      
  
Err http://http.debian.net wheezy-backports/main i386 Packages                             
  
Err http://security.debian.org wheezy/updates/non-free i386 Packages 
  
Ign http://ftp.debian.org wheezy-backports/main amd64 Packages/DiffIndex                   
Ign http://ftp.debian.org wheezy-backports/contrib amd64 Packages/DiffIndex                
Err http://http.debian.net wheezy-backports/main amd64 Packages                            
  
Err http://http.debian.net wheezy-backports/main i386 Packages                             
  
Err http://security.debian.org wheezy/updates/non-free amd64 Packages
  
Ign http://ftp.debian.org wheezy-backports/non-free amd64 Packages/DiffIndex
Ign http://ftp.debian.org wheezy-backports/main i386 Packages/DiffIndex
Err http://security.debian.org wheezy/updates/non-free i386 Packages 
  
Ign http://ftp.debian.org wheezy-backports/contrib i386 Packages/DiffIndex
Ign http://ftp.debian.org wheezy-backports/non-free i386 Packages/DiffIndex                
Err http://http.debian.net wheezy-backports/main amd64 Packages                            
  
Err http://http.debian.net wheezy-backports/main i386 Packages                             
  
Err http://security.debian.org wheezy/updates/non-free amd64 Packages
  
Ign http://http.debian.net wheezy-backports/main Translation-en_US   
Ign http://http.debian.net wheezy-backports/main Translation-en                            
Err http://security.debian.org wheezy/updates/non-free i386 Packages 
  
Err http://http.debian.net wheezy-backports/main amd64 Packages      
  404  Not Found
Ign http://security.debian.org wheezy/updates/contrib Translation-en_US
Ign http://security.debian.org wheezy/updates/contrib Translation-en 
Ign http://security.debian.org wheezy/updates/main Translation-en_US                       
Ign http://security.debian.org wheezy/updates/main Translation-en                          
Ign http://security.debian.org wheezy/updates/non-free Translation-en_US
Err http://http.debian.net wheezy-backports/main i386 Packages                             
  404  Not Found
Ign http://security.debian.org wheezy/updates/non-free Translation-en
Err http://security.debian.org wheezy/updates/main amd64 Packages
  404  Not Found
Err http://security.debian.org wheezy/updates/contrib amd64 Packages
  404  Not Found
Err http://security.debian.org wheezy/updates/non-free amd64 Packages
  404  Not Found
Err http://security.debian.org wheezy/updates/main i386 Packages
  404  Not Found
Err http://security.debian.org wheezy/updates/contrib i386 Packages
  404  Not Found
Err http://security.debian.org wheezy/updates/non-free i386 Packages
  404  Not Found
Ign http://ftp.debian.org wheezy/contrib Translation-en_US
Ign http://ftp.debian.org wheezy/contrib Translation-en
Ign http://ftp.debian.org wheezy/main Translation-en_US
Ign http://ftp.debian.org wheezy/main Translation-en
Ign http://ftp.debian.org wheezy/non-free Translation-en_US
Ign http://ftp.debian.org wheezy/non-free Translation-en
Ign http://ftp.debian.org wheezy-backports/contrib Translation-en_US
Ign http://ftp.debian.org wheezy-backports/contrib Translation-en
Ign http://ftp.debian.org wheezy-backports/main Translation-en_US
Ign http://ftp.debian.org wheezy-backports/main Translation-en
Ign http://ftp.debian.org wheezy-backports/non-free Translation-en_US
Ign http://ftp.debian.org wheezy-backports/non-free Translation-en
Err http://ftp.debian.org wheezy/main amd64 Packages
  404  Not Found
Err http://ftp.debian.org wheezy/contrib amd64 Packages
  404  Not Found
Err http://ftp.debian.org wheezy/non-free amd64 Packages
  404  Not Found
Err http://ftp.debian.org wheezy/main i386 Packages
  404  Not Found
Err http://ftp.debian.org wheezy/contrib i386 Packages
  404  Not Found
Err http://ftp.debian.org wheezy/non-free i386 Packages
  404  Not Found
Err http://ftp.debian.org wheezy-backports/main amd64 Packages
  404  Not Found
Err http://ftp.debian.org wheezy-backports/contrib amd64 Packages
  404  Not Found
Err http://ftp.debian.org wheezy-backports/non-free amd64 Packages
  404  Not Found
Err http://ftp.debian.org wheezy-backports/main i386 Packages
  404  Not Found
Err http://ftp.debian.org wheezy-backports/contrib i386 Packages
  404  Not Found
Err http://ftp.debian.org wheezy-backports/non-free i386 Packages
  404  Not Found
W: Failed to fetch http://security.debian.org/dists/wheezy/updates/main/binary-amd64/Packages  404  Not Found

W: Failed to fetch http://security.debian.org/dists/wheezy/updates/contrib/binary-amd64/Packages  404  Not Found

W: Failed to fetch http://ftp.debian.org/debian/dists/wheezy/main/binary-amd64/Packages  404  Not Found

W: Failed to fetch http://http.debian.net/debian/dists/wheezy-backports/main/binary-amd64/Packages  404  Not Found

W: Failed to fetch http://ftp.debian.org/debian/dists/wheezy/contrib/binary-amd64/Packages  404  Not Found

W: Failed to fetch http://http.debian.net/debian/dists/wheezy-backports/main/binary-i386/Packages  404  Not Found

W: Failed to fetch http://ftp.debian.org/debian/dists/wheezy/non-free/binary-amd64/Packages  404  Not Found

W: Failed to fetch http://ftp.debian.org/debian/dists/wheezy/main/binary-i386/Packages  404  Not Found

W: Failed to fetch http://security.debian.org/dists/wheezy/updates/non-free/binary-amd64/Packages  404  Not Found

W: Failed to fetch http://security.debian.org/dists/wheezy/updates/main/binary-i386/Packages  404  Not Found

W: Failed to fetch http://security.debian.org/dists/wheezy/updates/contrib/binary-i386/Packages  404  Not Found

W: Failed to fetch http://ftp.debian.org/debian/dists/wheezy/contrib/binary-i386/Packages  404  Not Found

W: Failed to fetch http://ftp.debian.org/debian/dists/wheezy/non-free/binary-i386/Packages  404  Not Found

W: Failed to fetch http://security.debian.org/dists/wheezy/updates/non-free/binary-i386/Packages  404  Not Found

W: Failed to fetch http://ftp.debian.org/debian/dists/wheezy-backports/main/binary-amd64/Packages  404  Not Found

W: Failed to fetch http://ftp.debian.org/debian/dists/wheezy-backports/contrib/binary-amd64/Packages  404  Not Found

W: Failed to fetch http://ftp.debian.org/debian/dists/wheezy-backports/non-free/binary-amd64/Packages  404  Not Found

W: Failed to fetch http://ftp.debian.org/debian/dists/wheezy-backports/main/binary-i386/Packages  404  Not Found

W: Failed to fetch http://ftp.debian.org/debian/dists/wheezy-backports/contrib/binary-i386/Packages  404  Not Found

W: Failed to fetch http://ftp.debian.org/debian/dists/wheezy-backports/non-free/binary-i386/Packages  404  Not Found

E: Some index files failed to download. They have been ignored, or old ones used instead.

El repositorio para Debian Wheezy ya no está disponible. Por eso los errores "404 Not Found".

Esto no significa que no sea posible instalar paquetes. Siempre es posible descargar el .deb desde cualquier mirror e instalarlo manualmente con dpkg. Pero, tal como mencionaba, los repositorio de las versiones de Debian sin soporte no desaparecen, sino que pasan al archivo.

Afortunadamente es posible descargar e instalar paquetes desde este archivo sin problemas, como si se tratase de un repositorio normal. Para comenzar, borrar todos los archivos dentro del directorio /etc/apt/sources.list.d/. Luego editar el archivo /etc/apt/sources.list:

root@debian7:~# nano /etc/apt/sources.list

Borrar todo su contenido y agregar las siguientes líneas:

deb http://archive.debian.org/debian/ wheezy contrib main non-free
deb http://archive.debian.org/debian-security wheezy/updates contrib main non-free

Esto funciona para cualquier otra distribución en el archivo, simplemente reemplazar "wheezy" por "squeezy", "lenny", o la distribución que sea.

Luego es necesario agregar una regla de configuración para que se ignore la fecha de expiración del archivo de Release. Esto es necesario para evitar errores del tipo:

E: Release file for http://archive.debian.org/debian-security/dists/wheezy/updates/Release is expired (invalid since 232d 20h 22min 7s). Updates for this repository will not be applied.

Crear un nuevo archivo de configuración, por ejemplo 80expired, dentro del directorio /etc/apt/apt.conf.d/:

root@debian7:~# nano /etc/apt/apt.conf.d/80expired

Agregar la siguiente configuración:

Acquire::Check-Valid-Until "0";

Ahora es posible actualizar la base de datos de paquetes e instalar cualquier paquete disponible en el archivo:

root@debian7:~# apt-get install debian-archive-keyring
root@debian7:~# apt-get update
Hit http://archive.debian.org wheezy Release.gpg
Get:1 http://archive.debian.org wheezy/updates Release.gpg [1,601 B]
Hit http://archive.debian.org wheezy Release
Hit http://archive.debian.org wheezy/updates Release
Get:2 http://archive.debian.org wheezy/contrib Translation-en [34.8 kB]
Get:3 http://archive.debian.org wheezy/main Translation-en [3,846 kB]
Get:4 http://archive.debian.org wheezy/non-free Translation-en [66.1 kB]
Get:5 http://archive.debian.org wheezy/updates/contrib Translation-en [14 B]
Get:6 http://archive.debian.org wheezy/updates/main Translation-en [338 kB]
Get:7 http://archive.debian.org wheezy/updates/non-free Translation-en [593 B]
Get:8 http://archive.debian.org wheezy/main amd64 Packages [7,634 kB]
Get:9 http://archive.debian.org wheezy/contrib amd64 Packages [50.5 kB]      
Get:10 http://archive.debian.org wheezy/non-free amd64 Packages [100 kB]     
Get:11 http://archive.debian.org wheezy/main i386 Packages [7,660 kB]                 
Get:12 http://archive.debian.org wheezy/contrib i386 Packages [50.9 kB]                                                                                               
Get:13 http://archive.debian.org wheezy/non-free i386 Packages [96.4 kB]                                                                                              
Get:14 http://archive.debian.org wheezy/updates/main amd64 Packages [743 kB]                                                                                          
Get:15 http://archive.debian.org wheezy/updates/contrib amd64 Packages [20 B]                                                                                         
Get:16 http://archive.debian.org wheezy/updates/non-free amd64 Packages [734 B]                                                                                       
Get:17 http://archive.debian.org wheezy/updates/main i386 Packages [749 kB]                                                                                           
Get:18 http://archive.debian.org wheezy/updates/contrib i386 Packages [20 B]                                                                                          
Get:19 http://archive.debian.org wheezy/updates/non-free i386 Packages [732 B]                                                                                        
Fetched 21.4 MB in 15s (1,418 kB/s)                                                                                                                                   
Reading package lists... Done

Referencias


Tal vez pueda interesarte


Compartí este artículo