Как починить пакетный менеджер? (Не устанавливаются и не удаляются полностью программы. (РЕШЕНО))

Для новичков как вообще в Linux, так и в конкретной теме, к которой относится вопрос.

Модератор: Bizdelnick

Stasroot1
Сообщения: 1030
ОС: Debian9

Как починить пакетный менеджер?

Сообщение Stasroot1 »

Доброго времени!

Возникла проблемма, не могу найти решение в гугле.
В ходе установки hostapd (деман шифрования wifi точек доступа) (я настраивал карточку wifi , чтобы с нее можно было раздать инет. Но в ходе установки hostapd возникли проблеммы:

Код: Выделить всё

dpkg: не удалось обработать параметр hostapd (--configure):
 подпроцесс установлен сценарий post-installation возвратил код ошибки 1

Решение подобной проблеммы вроде как тут: http://www.debianforum.ru/index.php?topic=2228.0
и есть тут: Решено: Сломались пакеты

Но попробовав предложенное не получается восстановить работоспособность пакетного менеджера. Боюсь теперь что либо ставить уждалять, и как быть теряюсь.

На данный момент у меня следующая ситуация:

Код: Выделить всё

sudo dpkg --configure -a
Настраивается пакет hostapd (1:1.0-3+b2) …
insserv: warning: script 'K01smfpd' missing LSB tags and overrides
insserv: warning: script 'smfpd' missing LSB tags and overrides
insserv: Starting smfpd depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: Starting smfpd depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: Starting smfpd depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: Starting smfpd depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: Starting smfpd depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: Starting smfpd depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: Starting smfpd depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: Starting smfpd depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: Starting smfpd depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: There is a loop between service smfpd and rc.local if started
insserv:  loop involving service rc.local at depth 22
insserv:  loop involving service smfpd at depth 1
insserv: Starting smfpd depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: exiting now without changing boot order!
update-rc.d: error: insserv rejected the script header
dpkg: ошибка при обработке параметра hostapd (--configure):
 подпроцесс установлен сценарий post-installation возвратил код ошибки 1
Настраивается пакет rsync (3.0.9-4) …
update-rc.d: using dependency based boot sequencing
insserv: warning: script 'K01smfpd' missing LSB tags and overrides
insserv: warning: script 'smfpd' missing LSB tags and overrides
insserv: Starting smfpd depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: Starting smfpd depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: Starting smfpd depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: Starting smfpd depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: Starting smfpd depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: Starting smfpd depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: Starting smfpd depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: Starting smfpd depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: Starting smfpd depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: There is a loop between service smfpd and rc.local if started
insserv:  loop involving service rc.local at depth 22
insserv:  loop involving service smfpd at depth 1
insserv: Starting smfpd depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: Starting smfpd depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: warning: script 'K01smfpd' missing LSB tags and overrides
insserv: warning: script 'smfpd' missing LSB tags and overrides
insserv: Starting smfpd depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: Starting smfpd depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: Starting smfpd depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: Starting smfpd depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: Starting smfpd depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: Starting smfpd depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: Starting smfpd depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: Starting smfpd depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: Starting smfpd depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: There is a loop between service smfpd and rc.local if started
insserv:  loop involving service rc.local at depth 22
insserv:  loop involving service smfpd at depth 1
insserv: Starting smfpd depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: exiting now without changing boot order!
update-rc.d: error: insserv rejected the script header
dpkg: ошибка при обработке параметра rsync (--configure):
 подпроцесс установлен сценарий post-installation возвратил код ошибки 1
При обработке следующих пакетов произошли ошибки:
 hostapd
 rsync

smpfd поиском нашел тут:


Как быть? куда копать? Может кто сталкивался?
У вас нет необходимых прав для просмотра вложений в этом сообщении.
Спасибо сказали:
Stasroot1
Сообщения: 1030
ОС: Debian9

Re: Как починить пакетный менеджер?

Сообщение Stasroot1 »

Доброго времени.

Получилось разобраться. Вроде как теперь все заработало.

Решение: опираясь на вывод в консоль:

Код: Выделить всё

There is a loop between service smfpd and rc.local if started
insserv:  loop involving service rc.local at depth 22
insserv:  loop involving service smfpd at depth 1
insserv: Starting smfpd depends on rc.local and therefore on system facility `$all' which can not be true!

Что переводится гуглом как:

Код: Выделить всё

Существует цикл между службами smfpd и rc.local, если началась
insserv: петля с участием службы rc.local на глубине 22
insserv: петля с участием службы smfpd на глубине 1
insserv: Начиная smfpd зависит от rc.local и, следовательно, в системе объекта `$ всех", которая не может быть правдой!


Еще были такие сообщения:

Код: Выделить всё

Starting smfpd depends on rmnologin and therefore on system facility `$all' which can not be true


Я пришел к выводу что надо эту службу: smfpd удалить из системы, просто убив ее ничего не менялось. Удалил так же как и ставил, используя скрипт uninstal.sh который был у поставщика драйвера для моего samsung scx-4824. Это поведение проявилось на драйвере версии UnifiedLinuxDriver-3.00.65.tar.gz взятом отсюда: http://www.bchemnet.com/suldr/smfpv3.html. К слову версия 3,00,90 не работала в моей системе...

Естесственно мой МФУ теперь курит в сторонке. думаю долго курить не придется.

PS система в которой проявилась проблемма: Debian7 снимок от 31,12,12г. В 6 версии такого поведения не наблюдалось.
Спасибо сказали:
Aliech
Сообщения: 1135
Статус: дилетант широкого профиля
ОС: debian/openbsd

Re: Как починить пакетный менеджер?

Сообщение Aliech »

Товарищ, надо было только поправить init скрипт демона из комплекта драйвера.
С уважением,
Павел Алиев
Спасибо сказали:
Stasroot1
Сообщения: 1030
ОС: Debian9

Re: Как починить пакетный менеджер?

Сообщение Stasroot1 »

Aliech писал(а):
05.01.2013 20:01
Товарищ, надо было только поправить init скрипт демона из комплекта драйвера.

Буду примного благодарен если подскажите как это сделать. Ибо перепробовав остальные версии драйверов под свё МФУ оно по прежнему откуривается за углом... Подходит только версия http://www.bchemnet.com/suldr/UnifiedLinux...-3.00.65.tar.gz ccылка ведет на скачивание архива с драйвером. (33Мб)
Спасибо сказали:
Stasroot1
Сообщения: 1030
ОС: Debian9

Re: Как починить пакетный менеджер?

Сообщение Stasroot1 »

Aliech писал(а):
05.01.2013 20:01
поправить init скрипт демона

Это вот этот? : /etc/init.d/smfpd ?
Вот он у меня какой:

Код: Выделить всё

#!/bin/sh

# smfpd is a parallel port handling daemon. It needs root privileges
# to use iopl(2), inb(2) and outb(2) system calls.
#
# smfpd uses inet domain socket, this script should be run
# after network initialization.
#
# This script is a part of Unified Linux Driver package.
# If your MFP device is not connected to LPT port, you can safely
# disable execution of this script - uncomment 'exit 0' at the next line.
exit 0

SMFPD=/usr/sbin/smfpd
test -x $SMFPD || exit 5

PATH=/usr/sbin:/sbin:/usr/bin:/bin
SMFPD=smfpd

PROCESS_PID=`ps ax | grep "[0-9]:[0-9][0-9] $SMFPD" | awk '{print $1}'`

case "$1" in
    check)
        if test -z "$PROCESS_PID"; then
            echo "Process is not running"
        else
            echo "Process $SMFPD[$PROCESS_PID] is running"
        fi
    ;;
    start)
        if test -z "$PROCESS_PID"; then
            echo -n "Starting smfpd daemon ... "
            $SMFPD
            echo "done"
            $0 check
        else
            echo "Process $SMFPD[$PROCESS_PID] is already running"
        fi
    ;;
    stop)
        if test -n "$PROCESS_PID"; then
            echo -n "Stopping smfpd daemon ... "
            kill -TERM $PROCESS_PID
            echo "done"
        else
            echo "Process is not running"
        fi
    ;;
    restart)
        $0 stop
        sleep 1
        $0 start
    ;;
    *)
        echo "Usage: $0 {check|start|stop|restart}"
        exit 1
    ;;
esac

exit 0


У меня только хватило сообразить удалить коментарий перед exit 0 в самом начале скрипта. Это я так понял отключает демона smfpd так как в моем случае LPT портом я не пользуюсь.

И да, демон отсутствует если его поискать через системный монитор. Но вот проблемма остается. Значит надо что то другое тут править? Что именно подскажите пожалуйста! А то с установленным драйвером пакетный мэнеджер постоянно ругается на эту smfpd, что странно даже когда оно не запущено в демона...

тот же файл, что и приведен выше в виде кода. :
У вас нет необходимых прав для просмотра вложений в этом сообщении.
Спасибо сказали:
Stasroot1
Сообщения: 1030
ОС: Debian9

Re: Как починить пакетный менеджер?

Сообщение Stasroot1 »

Спасибо сказали:
Stasroot1
Сообщения: 1030
ОС: Debian9

Re: Как починить пакетный менеджер?

Сообщение Stasroot1 »

Исходя из материалов по багу, который указал выше, пришел к следующему:

Надо отредактировать файл: /etc/init.d/smfpd Так, чтобы его начало выглядело так:

Код: Выделить всё

#!/bin/sh
### BEGIN INIT INFO
# Provides: smfpd
# Required-Start: $syslog
# Required-Stop: $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Unified Linux Driver package LPT Support daemon
# Description: Enable support for LPT port service provided by Unified Linux Driver package.
### END INIT INFO


Ну а дальше то что в этом файле шло так и оставляем... можем снимать или ставить коментарий на exit 0 в начале документа, от этого поменяется только будет демон запускаться или не будет. А этот демон я так понял нужен только для работы через lpt порт. если принтер не подключен таким образом, то можно снять коментарий.

Проблемма решена. окончательно. Баг это в дебиане или в драйвере? Мне представляется что в драйвере.

Для тех кто еще не знает и кому интересно почему файл должен начинаться так а не иначе, можно почитать тут на английском: http://wiki.debian.org/LSBInitScripts или воспользоваться переводчиком.
Спасибо сказали:
Aliech
Сообщения: 1135
Статус: дилетант широкого профиля
ОС: debian/openbsd

Re: Как починить пакетный менеджер?

Сообщение Aliech »

Это не баг системы, это неготовность драйвера)

Я рад, что вы нашли проблему! Это годно)
С уважением,
Павел Алиев
Спасибо сказали: