LinuxForum.Fans
Тема

траблы с apt

Автор: kaktus 9 сообщений 1523 просмотров
#377705
text
/usr/lib/apt/methods/http: error while loading shared libraries: libapt-pkg.so.4.10: cannot open shared object file: Error 23
E: Method http has died unexpectedly!
E: Порождённый процесс http вернул код ошибки (127)
E: Метод /usr/lib/apt/methods/http запустился не корректно

Куда рыть?

#377747

Правилом хорошего тона при общении тут является указание дистрибутива...
Что у Вас... ?

Оно или нет?
Дубликат БАГА...
https://bugs.launchpad.net/ubuntu/+source/software-center/+bug/778458
Основной БАГ...
https://bugs.launchpad.net/ubuntu/+source/dpkg/+bug/541595


Покажите вывод команды:
[console]apt-get update[/console]

#377749
mozgfx написал:
Правилом хорошего тона при общении тут является указание дистрибутива...
Что у Вас... ?

Оно или нет?
Дубликат БАГА...
https://bugs.launchpad.net/ubuntu/+source/software-center/+bug/778458
Основной БАГ...
https://bugs.launchpad.net/ubuntu/+source/dpkg/+bug/541595


Покажите вывод команды:
[console]apt-get update[/console]

Простите за вторжение ! Крик души просто..весь день восстанавливаю убитый мною же apt...
[console]# cat /etc/debian_version
6.0.9

# uname -a
Linux newtesthosting-210 2.6.32-348.3.1.el5.028stab106.2 #1 SMP Wed Mar 27 16:56:40 MSK 2013 x86_64 GNU/Linux[/console]

вывод apt-get update от root (от пользователя через sudo обновляет без ошибок)

Показать
# apt-get update
o# apt-get update
Получено:1 http://security.debian.org squeeze/updates Release.gpg [836 B]
Игн http://security.debian.org/ squeeze/updates/contrib Translation-en
Игн http://security.debian.org/ squeeze/updates/contrib Translation-ru
Игн http://security.debian.org/ squeeze/updates/main Translation-en
Игн http://security.debian.org/ squeeze/updates/main Translation-ru
Игн http://security.debian.org/ squeeze/updates/non-free Translation-en
Игн http://security.debian.org/ squeeze/updates/non-free Translation-ru
В кэше http://security.debian.org squeeze/updates Release
Игн http://security.debian.org squeeze/updates Release
Получено:2 http://ftp.de.debian.org squeeze Release.gpg [1 672 B]
Игн http://ftp.de.debian.org/debian/ squeeze/contrib Translation-en
Игн http://ftp.de.debian.org/debian/ squeeze/contrib Translation-ru
Игн http://ftp.de.debian.org/debian/ squeeze/main Translation-en
Игн http://ftp.de.debian.org/debian/ squeeze/main Translation-ru
Игн http://ftp.de.debian.org/debian/ squeeze/non-free Translation-en
Игн http://ftp.de.debian.org/debian/ squeeze/non-free Translation-ru
Игн http://security.debian.org squeeze/updates/main Sources/DiffIndex
В кэше http://ftp.de.debian.org squeeze Release
Игн http://ftp.de.debian.org squeeze Release
Игн http://security.debian.org squeeze/updates/contrib Sources/DiffIndex
Игн http://security.debian.org squeeze/updates/non-free Sources/DiffIndex
Игн http://security.debian.org squeeze/updates/main amd64 Packages/DiffIndex
Игн http://security.debian.org squeeze/updates/contrib amd64 Packages/DiffIndex
Игн http://security.debian.org squeeze/updates/non-free amd64 Packages/DiffIndex
Игн http://ftp.de.debian.org squeeze/main Sources/DiffIndex
Игн http://security.debian.org squeeze/updates/main Sources
Игн http://ftp.de.debian.org squeeze/contrib Sources/DiffIndex
Игн http://ftp.de.debian.org squeeze/non-free Sources/DiffIndex
Игн http://ftp.de.debian.org squeeze/main amd64 Packages/DiffIndex
Игн http://ftp.de.debian.org squeeze/contrib amd64 Packages/DiffIndex
Игн http://ftp.de.debian.org squeeze/non-free amd64 Packages/DiffIndex
Игн http://security.debian.org squeeze/updates/contrib Sources
Игн http://security.debian.org squeeze/updates/non-free Sources
Игн http://security.debian.org squeeze/updates/main amd64 Packages
Игн http://security.debian.org squeeze/updates/contrib amd64 Packages
Игн http://security.debian.org squeeze/updates/non-free amd64 Packages
Игн http://ftp.de.debian.org squeeze/main Sources
Игн http://ftp.de.debian.org squeeze/contrib Sources
Игн http://ftp.de.debian.org squeeze/non-free Sources
Получено:3 http://nginx.org squeeze Release.gpg [287 B]
Игн http://nginx.org/packages/debian/ squeeze/nginx Translation-en
В кэше http://security.debian.org squeeze/updates/main Sources
В кэше http://security.debian.org squeeze/updates/contrib Sources
В кэше http://security.debian.org squeeze/updates/non-free Sources
В кэше http://security.debian.org squeeze/updates/main amd64 Packages
Игн http://ftp.de.debian.org squeeze/main amd64 Packages
Игн http://ftp.de.debian.org squeeze/contrib amd64 Packages
В кэше http://security.debian.org squeeze/updates/contrib amd64 Packages
Игн http://ftp.de.debian.org squeeze/non-free amd64 Packages
В кэше http://ftp.de.debian.org squeeze/main Sources
В кэше http://ftp.de.debian.org squeeze/contrib Sources
В кэше http://security.debian.org squeeze/updates/non-free amd64 Packages
В кэше http://ftp.de.debian.org squeeze/non-free Sources
В кэше http://ftp.de.debian.org squeeze/main amd64 Packages
Игн http://nginx.org/packages/debian/ squeeze/nginx Translation-ru
В кэше http://nginx.org squeeze Release
Игн http://nginx.org squeeze Release
В кэше http://ftp.de.debian.org squeeze/contrib amd64 Packages
В кэше http://ftp.de.debian.org squeeze/non-free amd64 Packages
Игн http://nginx.org squeeze/nginx Sources/DiffIndex
Игн http://nginx.org squeeze/nginx amd64 Packages/DiffIndex
Игн http://nginx.org squeeze/nginx Sources
Игн http://nginx.org squeeze/nginx amd64 Packages
В кэше http://nginx.org squeeze/nginx Sources
В кэше http://nginx.org squeeze/nginx amd64 Packages
Получено 2 795 Б за 1с (1 578 Б/c)
Чтение списков пакетов... Готово
W: Ошибка GPG: http://security.debian.org squeeze/updates Release: Неизвестная ошибка при выполнении gpgv
W: Ошибка GPG: http://ftp.de.debian.org squeeze Release: Неизвестная ошибка при выполнении gpgv
W: Ошибка GPG: http://nginx.org squeeze Release: Неизвестная ошибка при выполнении gpgv

это уже после того как я перерыл баг-репорты и, скачав эту libapt-pkg.so.4.10, залив ее, заменяя предыдущую, получил вывод уже с этими ошибками..
предыстория

Показать

завел ВПС с внешним ипом, по этой статье с хабра http://habrahabr.ru/post/92107/
поставил php apache2 mysql , несколько модулей и мой мини-хостинг "для себя" заработал. Сегодня захотел поднять почту и по неопытности начал искать подходящее и натыкал в консоль...
вот перечень команд, после которых скорее всего пошли траблы с apt - просто куча разных ошибок...
Показать
apt-get install postfix postgrey clamav-daemon mysql-server
78 sudo apt-get install postfix postgrey clamav-daemon mysql-server
79 sudo apt-get install nslcd nscd
80 sudo apt-get -t squeeze-backports install dovecot-core dovecot-imapd dovecot-pop3d dovecot-lmtpd dovecot-antispam dovecot-sieve dovecot-managesieved dspam libdspam7-drv-mysql
81 apt-get install postfix postfix-mysql postfix-doc mysql-client mysql-server courier-authdaemon
82 courier-authlib-mysql courier-pop courier-pop-ssl courier-imap courier-imap-ssl
83 libsasl2-2 libsasl2-modules libsasl2-modules-sql sasl2-bin libpam-mysql openssl phpmyadmin
84 sudo apt-get install postfix postfix-mysql postfix-doc mysql-client mysql-server courier-authdaemon
85 courier-authlib-mysql courier-pop courier-pop-ssl courier-imap courier-imap-ssl
86 libsasl2-2 libsasl2-modules libsasl2-modules-sql sasl2-bin libpam-mysql openssl phpmyadmin
87 apache2 libapache2-mod-php5 php5 php5-mysql postfix-pcre gaminclear
88 clear
89 sudo apt-get install postfix postfix-mysql postfix-doc mysql-client mysql-server courier-authdaemon
90 courier-authlib-mysql courier-pop courier-pop-ssl courier-imap courier-imap-ssl
91 libsasl2-2 libsasl2-modules libsasl2-modules-sql sasl2-bin libpam-mysql openssl phpmyadmin
92 sudo apt-get install postfix

#377762

Вы убивали от рута или от sudo?
если последнее, может стоит взглянуть на логи?

#377775

kaktus, согласно include/asm-generic/errno-base.h в дереве исходников ядра, код 23 означает ошибку "file table overflow", гугл говорит, что эта ошибка возникала с ядрами 2.0.x-2.2.x. Ошибка связана с превышением лимита на количество открытых файлов. Покажите:

text
$ uname -a
# cat /proc/sys/kernel/file-max

Изменить этот параметр можно, выполнив:

text
 # echo 32768 > /proc/sys/kernel/file-max

если ошибка исчезнет, то нужно это же сделать, вписав в /etc/sysctl.conf параметр fs.file-max с требуемым значением.

#377786

логи

Показать
$ sudo tail -f /var/log/messages
[sudo] password for user:
Apr 26 05:49:52 newtesthosting-210 -- MARK --
Apr 26 06:09:52 newtesthosting-210 -- MARK --
Apr 26 06:29:52 newtesthosting-210 -- MARK --
Apr 26 06:49:52 newtesthosting-210 -- MARK --
Apr 26 07:09:52 newtesthosting-210 -- MARK --
Apr 26 07:29:52 newtesthosting-210 -- MARK --
Apr 26 07:49:52 newtesthosting-210 -- MARK --
Apr 26 08:09:53 newtesthosting-210 -- MARK --
Apr 26 08:29:53 newtesthosting-210 -- MARK --
Apr 26 08:49:53 newtesthosting-210 -- MARK --

По поводу количетсва файлов - уже смотрел и увеличил, даже несколько раз...

[console]# cat /proc/sys/fs/file-max
2462016
[/console]

А логи чего глядим?

вот пока что выводит apt-get update от root
[console]root@newtesthosting-210:/proc# cat /proc/sys/fs/file-max
2462016
root@newtesthosting-210:/proc# apt-get update
/usr/lib/apt/methods/http: error while loading shared libraries: libz.so.1: cannot open shared object file: Error 23
E: Method http has died unexpectedly!
E: Порождённый процесс http вернул код ошибки (127)
E: Метод /usr/lib/apt/methods/http запустился не корректно
[/console]

по поводу ld.so библиотек - есть рекомендация прописать в файл ld.so.conf пути к ббилиотекам...сделал так:
[console]
# cat ld.so.conf
#include /etc/ld.so.conf.d/*.conf
#include /usr/lib[/console]

раскоментил, теперь вывод apt-get update от sudo su такой

Показать
[console]# apt-get update
Ош http://ftp.de.debian.org squeeze Release.gpg
Не удалось найти IP адрес для [url=ftp://ftp.de.debian.org]ftp.de.debian.org[/url]
Ош http://ftp.de.debian.org/debian/ squeeze/contrib Translation-en
Не удалось найти IP адрес для [url=ftp://ftp.de.debian.org]ftp.de.debian.org[/url]
Ош http://ftp.de.debian.org/debian/ squeeze/contrib Translation-ru
Не удалось найти IP адрес для [url=ftp://ftp.de.debian.org]ftp.de.debian.org[/url]
Ош http://ftp.de.debian.org/debian/ squeeze/main Translation-en
Не удалось найти IP адрес для [url=ftp://ftp.de.debian.org]ftp.de.debian.org[/url]
Ош http://ftp.de.debian.org/debian/ squeeze/main Translation-ru
Не удалось найти IP адрес для [url=ftp://ftp.de.debian.org]ftp.de.debian.org[/url]
Ош http://ftp.de.debian.org/debian/ squeeze/non-free Translation-en
Не удалось найти IP адрес для [url=ftp://ftp.de.debian.org]ftp.de.debian.org[/url]
Ош http://ftp.de.debian.org/debian/ squeeze/non-free Translation-ru
Не удалось найти IP адрес для [url=ftp://ftp.de.debian.org]ftp.de.debian.org[/url]
Ош http://security.debian.org squeeze/updates Release.gpg
Не удалось найти IP адрес для security.debian.org
Ош http://security.debian.org/ squeeze/updates/contrib Translation-en
Не удалось найти IP адрес для security.debian.org
Ош http://security.debian.org/ squeeze/updates/contrib Translation-ru
Не удалось найти IP адрес для security.debian.org
Ош http://security.debian.org/ squeeze/updates/main Translation-en
Не удалось найти IP адрес для security.debian.org
Ош http://security.debian.org/ squeeze/updates/main Translation-ru
Не удалось найти IP адрес для security.debian.org
Ош http://security.debian.org/ squeeze/updates/non-free Translation-en
Не удалось найти IP адрес для security.debian.org
Ош http://security.debian.org/ squeeze/updates/non-free Translation-ru
Не удалось найти IP адрес для security.debian.org
Игн http://nginx.org squeeze Release.gpg
Игн http://nginx.org/packages/debian/ squeeze/nginx Translation-en
5% [Обработка]FATAL -> Could not set non-blocking flag Bad file descriptor
E: Method http has died unexpectedly!
E: Порождённый процесс http вернул код ошибки (100)
[/console]

может беда в sources.list ???

Показать
# Main Repos
deb http://ftp.de.debian.org/debian/ squeeze main contrib non-free
deb-src http://ftp.de.debian.org/debian/ squeeze main contrib non-free

# Update security
deb http://security.debian.org/ squeeze/updates main contrib non-free
deb-src http://security.debian.org/ squeeze/updates main contrib non-free

# Hetzner squeeze
#deb http://mirror.hetzner.de/debian/packages squeeze main contrib non-free
#deb http://mirror.hetzner.de/debian/security squeeze/updates main contrib non-free

# Hetzner lenny
#deb http://mirror.hetzner.de/debian/packages lenny main contrib non-free
#deb http://mirror.hetzner.de/debian/security lenny/updates main contrib non-free

# backports
#deb http://backports.debian.org/debian-backports squeeze-backports main

# nginx
deb http://nginx.org/packages/debian/ squeeze nginx
deb-src http://nginx.org/packages/debian/ squeeze
#377801
"kaktus" написал:
может беда в sources.list ???

Как вариант... Но актуальность репозитариев проверить Вам помогут только владельцы Debian.
Вчера как раз читал про подобную проблему...
Актуальность репозиториев проверяли?


Еще подобная проблема возникает при обновлении дистрибутива...
То есть apt-get при выполнении обновления так же обновляется и как результат появление подобной ошибки.

#377957

следующий виток.
Обновил репы, взял с http://mirrors.kernel.org/debian/dists/

теперь вот так при [console]apt-get upgrade[/console]от рута

Показать
# apt-get upgrade
Чтение списков пакетов... Готово
Построение дерева зависимостей
Чтение информации о состоянии... Готово
Пакеты, которые будут обновлены:
tzdata
обновлено 1, установлено 0 новых пакетов, для удаления отмечено 0 пакетов, и 0 пакетов не обновлено.
Необходимо скачать 0 B/622 kB архивов.
После данной операции, объём занятого дискового пространства возрастёт на 0 B.
Хотите продолжить [Д/н]? y
apt-extracttemplates: error while loading shared libraries: libdl.so.2: cannot open shared object file: Error 23
debconf: ошибка при работе apt-extracttemplates: Неправильный дескриптор файла
tar: error while loading shared libraries: librt.so.1: cannot open shared object file: Error 23
dpkg-deb: подпроцесс tar возвратил код ошибки 127
dpkg: не удалось обработать параметр /var/cache/apt/archives/tzdata_2014a-0squeeze1_all.deb (--unpack):
подпроцесс dpkg-deb --control возвратил код ошибки 2
configured to not write apport reports
При обработке следующих пакетов произошли ошибки:
/var/cache/apt/archives/tzdata_2014a-0squeeze1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

пробовал закоментить tzdata - пакеты из директории /var/lib/dpkg/info , как описанов этой статье http://pingvinoff.net/2011/12/25/reshenie-oshibki-e-sub-process-usrbindpkg-returned-an-error-code-na-debian/- нет эффекта...

#377962

libdl.so.2 входит в состав пакета libc6. Попробуйте удалить пакет и как вариант через aptitude установить, или скачать и поставить через dpkg.

Войдите или зарегистрируйтесь, чтобы ответить.