Como consertar uma atualização clamav quebrada devido à configuração do sistema local?

0

Eu tentei atualizar o clamav/freshclam agora e a atualização falhou. O motivo foi porque eu modifiquei /lib/systemd/system/clamav-freshclam.service e não queria que o processo de atualização substituísse isso com o novo (o que teria impedido meu servidor de parar, como de costume).

Como esperado, o erro foi:

Unpacking clamav-daemon (0.99.4+dfsg-1+deb9u1) over (0.99.2+dfsg-6+deb9u1) ...
dpkg: error processing archive /tmp/apt-dpkg-install-VSTxD6/09-clamav-daemon_0.99.4+dfsg-1+deb9u1_amd64.deb (--unpack):
 unable to make backup link of './lib/systemd/system/clamav-daemon.service' before installing new version: Operation not permitted
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)

Unpacking clamav-freshclam (0.99.4+dfsg-1+deb9u1) over (0.99.2+dfsg-6+deb9u1) ...
dpkg: error processing archive /tmp/apt-dpkg-install-VSTxD6/12-clamav-freshclam_0.99.4+dfsg-1+deb9u1_amd64.deb (--unpack):
 unable to make backup link of './lib/systemd/system/clamav-freshclam.service' before installing new version: Operation not permitted
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Preparing to unpack .../13-clamav_0.99.4+dfsg-1+deb9u1_amd64.deb ...

Eu removi os atributos para que ele pudesse ser executado novamente:

chattr -i  /lib/systemd/system/clamav-daemon.service /lib/systemd/system/clamav-freshclam.service

Mas agora todas as atualizações falham com:

5 packages can be upgraded. Run 'apt list --upgradable' to see them.
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 clamav-daemon : Depends: clamav-base (= 0.99.2+dfsg-6+deb9u1) but 0.99.4+dfsg-1+deb9u1 is installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

Eu então corri apt - install -fix-broken , que corrigiu "tudo" ...

E então copiei meus scripts do systemd de volta. Naturalmente, o pacote clamav não respeita minhas alterações.

apt --fix-broken install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
  clamav-daemon
Suggested packages:
  apparmor daemon
The following packages will be upgraded:
  clamav-daemon
1 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
33 not fully installed or removed.
Need to get 0 B/445 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Reading changelogs... Done
Preconfiguring packages ...
Setting up libapparmor1:amd64 (2.11.0-3+deb9u2) ...
Setting up systemd (232-25+deb9u2) ...
addgroup: The group 'systemd-journal' already exists as a system group. Exiting.
(Reading database ... 90274 files and directories currently installed.)
Preparing to unpack .../clamav-daemon_0.99.4+dfsg-1+deb9u1_amd64.deb ...
Unpacking clamav-daemon (0.99.4+dfsg-1+deb9u1) over (0.99.2+dfsg-6+deb9u1) ...
Setting up libncurses5:amd64 (6.0+20161126-1+deb9u2) ...
Setting up ncurses-term (6.0+20161126-1+deb9u2) ...
Setting up clamav-docs (0.99.4+dfsg-1+deb9u1) ...
Processing triggers for ufw (0.35-4) ...
Rules updated for profile 'Dovecot Secure IMAP'
Rules updated for profile 'Postfix'
Rules updated for profile 'Postfix SMTPS'
Rules updated for profile 'Postfix Submission'
Rules updated for profile 'WWW Secure'
Skipped reloading firewall
Setting up clamav-base (0.99.4+dfsg-1+deb9u1) ...
Processing triggers for mime-support (3.60) ...
Setting up systemd-sysv (232-25+deb9u2) ...
Setting up libclamav7:amd64 (0.99.4+dfsg-1+deb9u1) ...
Setting up ntp (1:4.2.8p10+dfsg-3+deb9u2) ...
Setting up ntp-doc (1:4.2.8p10+dfsg-3+deb9u2) ...
Setting up python3-reportbug (7.1.7+deb9u1) ...
Setting up clamav (0.99.4+dfsg-1+deb9u1) ...
Processing triggers for libc-bin (2.24-11+deb9u3) ...
Setting up ntpdate (1:4.2.8p10+dfsg-3+deb9u2) ...
Setting up pdns-recursor (4.0.4-1+deb9u3+b1) ...
addgroup: The group 'pdns' already exists as a system group. Exiting.
Warning: The home dir /var/spool/powerdns you specified already exists.
The system user 'pdns' already exists. Exiting.
Setting up udev (232-25+deb9u2) ...
addgroup: The group 'input' already exists as a system group. Exiting.
update-initramfs: deferring update (trigger activated)
Setting up clamav-daemon (0.99.4+dfsg-1+deb9u1) ...
Setting up libc-l10n (2.24-11+deb9u3) ...
Processing triggers for systemd (232-25+deb9u2) ...
Processing triggers for man-db (2.7.6.1-2) ...
Setting up libc-dev-bin (2.24-11+deb9u3) ...
Setting up postfix-sqlite (3.1.8-0+deb9u1) ...
Adding sqlite map entry to /etc/postfix/dynamicmaps.cf
Setting up openssh-client (1:7.4p1-10+deb9u3) ...
Setting up libc6-dev:amd64 (2.24-11+deb9u3) ...
Setting up cron (3.0pl1-128+deb9u1) ...
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
Setting up clamdscan (0.99.4+dfsg-1+deb9u1) ...
Setting up locales (2.24-11+deb9u3) ...
Generating locales (this might take a while)...
  de_DE.UTF-8... done
  en_US.UTF-8... done
  ru_RU.UTF-8... done
Generation complete.
Processing triggers for rsyslog (8.24.0-1) ...
Setting up libdbus-1-3:amd64 (1.10.26-0+deb9u1) ...
Setting up postfix (3.1.8-0+deb9u1) ...
Installing new version of config file /etc/postfix/makedefs.out ...

Postfix (main.cf) configuration was untouched.  If you need to make changes, 
edit /etc/postfix/main.cf (and others) as needed.  To view Postfix 
configuration values, see postconf(1).

After modifying main.cf, be sure to run 'service postfix reload'.

Running newaliases
Setting up libcups2:amd64 (2.2.1-8+deb9u1) ...
Setting up postfix-pcre (3.1.8-0+deb9u1) ...
Setting up reportbug (7.1.7+deb9u1) ...
Setting up libcupsimage2:amd64 (2.2.1-8+deb9u1) ...
Setting up openssh-sftp-server (1:7.4p1-10+deb9u3) ...
Setting up dbus (1.10.26-0+deb9u1) ...
A reboot is required to replace the running dbus-daemon.
Please reboot the system when convenient.
Setting up libpam-systemd:amd64 (232-25+deb9u2) ...
Setting up openssh-server (1:7.4p1-10+deb9u3) ...
Processing triggers for initramfs-tools (0.130) ...
update-initramfs: Generating /boot/initrd.img-4.9.0-6-amd64
W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.
Processing triggers for libc-bin (2.24-11+deb9u3) ...
[master 3f54836] committing changes in /etc after apt run
 3 files changed, 5 insertions(+), 4 deletions(-)

Existe uma correção para isso sem reinstalar completamente o clamav / frashclam? Levei horas para trabalhar com rspamd e outros.

    
por Soph 11.03.2018 / 12:46

0 respostas