@KonstantinDyulin

Как решить проблему с загрузкой пакетов в debian?

Есть вот такой Dockerfile
FROM php:8.2-fpm

COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer
                                                                     
# Install useful tools                                               
                                                                     
# Install important libraries                                        
RUN apt-get update && apt-get -y install --fix-missing \             
    apt-utils \                                                      
    build-essential \                                                
    git \                                                            
    curl \                                                           
    zlib1g-dev \                                                     
    libzip-dev \                                                     
    zip \                                                            
    libbz2-dev \                                                     
    locales \                                                        
    libmcrypt-dev \                                                  
    libicu-dev \                                                     
    libonig-dev \                                                    
    libxml2-dev                                                      
                                                                     
RUN docker-php-ext-install \                                         
     exif \                                                          
     pcntl \                                                         
     bcmath \                                                        
     ctype \                                                         
     iconv \                                                         
     xml \                                                           
     soap \                                                          
     pcntl \                                                         
     mbstring \                                                      
     #tokenizer \                                                    
     bz2 \                                                           
     zip \                                                           
     intl \                                                          
    gettext


Но при попытке сбилдить его, падают вот такие ошибки, я так понимаю не получается подтянуть пакеты.
Может кто сталкивался с подобным, подскажите пожалуйста как решить эту проблему
30.36 Get:1 http://deb.debian.org/debian bookworm InRelease [151 kB]
60.39 Ign:1 http://deb.debian.org/debian bookworm InRelease
60.45 Get:2 http://deb.debian.org/debian bookworm-updates InRelease [55.4 kB]
90.46 Ign:2 http://deb.debian.org/debian bookworm-updates InRelease
120.6 Get:3 http://deb.debian.org/debian-security bookworm-security InRelease [48.0 kB]
150.6 Ign:3 http://deb.debian.org/debian-security bookworm-security InRelease
210.7 Ign:1 http://deb.debian.org/debian bookworm InRelease
210.8 Get:2 http://deb.debian.org/debian bookworm-updates InRelease [55.4 kB]
240.8 Ign:2 http://deb.debian.org/debian bookworm-updates InRelease
240.8 Get:3 http://deb.debian.org/debian-security bookworm-security InRelease [48.0 kB]
270.9 Ign:3 http://deb.debian.org/debian-security bookworm-security InRelease
270.9 Get:1 http://deb.debian.org/debian bookworm InRelease [151 kB]
301.0 Ign:1 http://deb.debian.org/debian bookworm InRelease
331.1 Get:2 http://deb.debian.org/debian bookworm-updates InRelease [55.4 kB]
361.1 Ign:2 http://deb.debian.org/debian bookworm-updates InRelease
391.2 Get:3 http://deb.debian.org/debian-security bookworm-security InRelease [48.0 kB]
421.2 Ign:3 http://deb.debian.org/debian-security bookworm-security InRelease
451.3 Get:1 http://deb.debian.org/debian bookworm InRelease [151 kB]
481.4 Err:1 http://deb.debian.org/debian bookworm InRelease
481.4   Connection timed out [IP: 151.101.246.132 80]
481.4 Get:2 http://deb.debian.org/debian bookworm-updates InRelease [55.4 kB]
511.4 Err:2 http://deb.debian.org/debian bookworm-updates InRelease
511.4   Connection timed out [IP: 151.101.246.132 80]
541.6 Get:3 http://deb.debian.org/debian-security bookworm-security InRelease [48.0 kB]
571.6 Err:3 http://deb.debian.org/debian-security bookworm-security InRelease
571.6   Connection timed out [IP: 151.101.246.132 80]
571.6 Reading package lists...
571.6 W: Failed to fetch http://deb.debian.org/debian/dists/bookworm/InRelease  Connection timed out [IP: 151.101.246.132 80]
571.6 W: Failed to fetch http://deb.debian.org/debian/dists/bookworm-updates/InRelease  Connection timed out [IP: 151.101.246.132 80]
571.6 W: Failed to fetch http://deb.debian.org/debian-security/dists/bookworm-security/InRelease  Connection timed out [IP: 151.101.246.132 80]
571.6 W: Some index files failed to download. They have been ignored, or old ones used instead.
571.6 Reading package lists...
571.6 Building dependency tree...
571.6 Reading state information...
571.6 Package apt-utils is not available, but is referred to by another package.
571.6 This may mean that the package is missing, has been obsoleted, or
571.6 is only available from another source
571.6 However the following packages replace it:
571.6   apt
571.6
571.6 Package build-essential is not available, but is referred to by another package.
571.6 This may mean that the package is missing, has been obsoleted, or
571.6 is only available from another source
571.6
571.6 Package locales is not available, but is referred to by another package.
571.6 This may mean that the package is missing, has been obsoleted, or
571.6 is only available from another source
571.6
571.6 Package git is not available, but is referred to by another package.
571.6 This may mean that the package is missing, has been obsoleted, or
571.6 is only available from another source
571.6
571.6 E: Package 'apt-utils' has no installation candidate
571.6 E: Package 'build-essential' has no installation candidate
571.6 E: Package 'git' has no installation candidate
571.6 E: Unable to locate package zlib1g-dev
571.6 E: Unable to locate package libzip-dev
571.6 E: Unable to locate package zip
571.6 E: Unable to locate package libbz2-dev
571.6 E: Package 'locales' has no installation candidate
571.6 E: Unable to locate package libmcrypt-dev
571.6 E: Unable to locate package libicu-dev
571.6 E: Unable to locate package libonig-dev
571.6 E: Unable to locate package libxml2-dev
  • Вопрос задан
  • 537 просмотров
Решения вопроса 1
@xibir
Надо поменять зеркало, перед apt-update можно добавить:

echo 'deb http://mirror.yandex.ru/debian/ bookworm main contrib non-free non-free-firmware
deb-src http://mirror.yandex.ru/debian/ bookworm main contrib non-free non-free-firmware

deb http://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
deb-src http://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware

deb http://mirror.yandex.ru/debian/ bookworm-updates main contrib non-free non-free-firmware
deb-src http://mirror.yandex.ru/debian/ bookworm-updates main contrib non-free non-free-firmware' > /etc/apt/sources.list
Ответ написан
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы