Score:2

Error installing imagick: Sub-process /usr/bin/dpkg returned an error code (1)

hk flag

in my ubuntu machine I'm trying to install imagick from command line, like this:

sudo apt install imagemagick-6.q16

But I'm getting this error message:


Reading package lists... Done
Building dependency tree
Reading state information... Done
imagemagick-6.q16 is already the newest version (8:6.9.7.4+dfsg-16ubuntu6.15).
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up rsyslog (8.32.0-1ubuntu4.2) ...
The user `syslog' is already a member of `adm'.
Unsafe symlinks encountered in /var/log, refusing.
Unsafe symlinks encountered in /var/log/auth.log, refusing.
Unsafe symlinks encountered in /var/log/kern.log, refusing.
Unsafe symlinks encountered in /var/log/syslog, refusing.
dpkg: error processing package rsyslog (--configure):
 installed rsyslog package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 rsyslog
E: Sub-process /usr/bin/dpkg returned an error code (1)

What does it mean?

EDIT1: Added output of ls -ld /var/ /var/log/ /var/log/syslog /var/log/auth.log /var/log/kern.log

https://i.imgur.com/EWL8IH4.png

Raffa avatar
jp flag
Please [edit] your question to include the output of `ls -ld /var/ /var/log/ /var/log/syslog /var/log/auth.log /var/log/kern.log`
waltinator avatar
it flag
The message means that you or a sysadmin have replaced the `/var/log/` directory with a symbolic link to somewhere else. `rsyslog` can't know if "somewhere else" will be mounted early enough in the boot process. See the Filesystem Hierarcy Standard at `https://refspecs.linuxfoundation.org/fhs.shtml`, or read `man hier`. It explains where things go.
gabogabans avatar
hk flag
Added output of @Raffa command, afaik I didn't do anything fancy with this files, is this fixable?
Raffa avatar
jp flag
Please copy and paste text instead of making it into a picture ... Your `/var/` directory which should be owned by `root` is instead owned by the web-server's user `www-data` which you or a script/app you ran did ... That can be very hard to fix depending on what else you did, but start with `sudo chown root:root /var/` then try the installation again and see if you get any errors.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.