1

I am trying to install some Qt libraries like this:

sudo apt-get install libqt5webengine5  libqt5webenginewidgets5

But I keep getting such errors:

The hostname -f command returned: $1

Your system needs to have a fully qualified domain name (fqdn) in
order to install the var-qmail packages.

Installation aborted.

dpkg: error processing package qmail (--configure):
 installed qmail package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of qmail-run:
 qmail-run depends on qmail (>= 1.06-2.1); however:
  Package qmail is not configured yet.

No apport report written because the error message indicates its a followup error from a previous failure.
                          dpkg: error processing package qmail-run (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 qmail
 qmail-run
E: Sub-process /usr/bin/dpkg returned an error code (1)

How can I install these libraries?

Edit:

ls: cannot access '–l': No such file or directory
qmail.list
qmail.md5sums
qmail.postinst
qmail.postrm
qmail.preinst
qmail-run.conffiles
qmail-run.list
qmail-run.md5sums
qmail-run.postinst
qmail-run.postrm
qmail-run.preinst
qmail-uids-gids.list
qmail-uids-gids.md5sums
qmail-uids-gids.postinst
qmail-uids-gids.postrm
qmail-uids-gids.preinst
The hostname -f command returned: Lenovo-V330-15IKB

You must have a fully qualified domain name (fqdn) for your system
to install the qmail and qmail-run packages.

Installation aborted.

dpkg: error processing package qmail-run (--configure):
 installed qmail-run package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 qmail-run
E: Sub-process /usr/bin/dpkg returned an error code (1)

Error on sudo dpkg --configure -a

Setting up qmail-run (2.0.2+nmu1) ...

The hostname -f command returned: hammad-Lenovo-V330-15IKB

You must have a fully qualified domain name (fqdn) for your system
to install the qmail and qmail-run packages.

Installation aborted.

dpkg: error processing package qmail-run (--configure):
 installed qmail-run package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 qmail-run
x89
  • 111
  • 3
  • The error isn't related to the libraries, they're an unresolved problem from a previous attempt to install qmail. Did you mean to install qmail? It's a bizarre choice if you don't know how to solve this problem. Did you mean to have non-local mail at all? What distribution is this? – Gilles 'SO- stop being evil' Apr 25 '20 at 13:51
  • Please check if you can fix it this way `sudo dpkg --configure -a` then `sudo apt-get install -f libraries`. – binarysta Apr 25 '20 at 14:16
  • I am just trying to install Qt Libraries: QtWebEngine Widgets. I have no idea what qmail even is and why it's coming here @Gilles'SO-stopbeingevil' – x89 Apr 25 '20 at 14:16
  • @FSJ Did you try instaling with `-f` option as I mentioned? and please update with output of `sudo ls -l /var/lib/dpkg/info | grep -i qmail`, seems you need to remove those files. let's check. – binarysta Apr 25 '20 at 14:20
  • Yes, I tried but same errors. I added the output in the qs @binarysta – x89 Apr 25 '20 at 14:23
  • ok just move those files and try installing. `sudo mv /var/lib/dpkg/info/qmail.* /tmp/qmail/` then `sudo apt-get update` and install libs. – binarysta Apr 25 '20 at 14:28
  • Actually, I just tired this ```sudo apt-get update && sudo apt-get install qtwebengine5-dev``` and the project runs now. But I still get the qmail errors during installation. No idea why. – x89 Apr 25 '20 at 14:37
  • 1
    Please do `sudo dpkg --configure -a` again. Actually the issue is not related to the Qt libraries. As you see the error, after installing qmail the `qmail-run` tried to do some configurations like a post-installation operation but has been broken. so be sure to NO qmail related files existed in `var/lib/dpkg/info/qmail.*` – binarysta Apr 25 '20 at 14:41
  • Still getting the same error on configure @binarysta – x89 Apr 25 '20 at 14:43
  • 1
    @FSJ just remove qmail and install again later if you need. `sudo apt-get remove -purge qmail` and then `sudo apt-get update && sudo apt-get dist-upgrade -y` – binarysta Apr 25 '20 at 14:48

1 Answers1

0

I am not a huge guru sysadmin, --- let experienced sysadmins correct me, --- and I haven't read qmail and hostname docs and source code thoroughly, but this helped to get rid of the error, causing some warning at my Ubuntu 18.04.x:

root@desktop1-ubuntu18-04-x-tsikada-east-siberian-mountain:~# hostname desktop1-ubuntu18-04-x.tsikada-east-siberian-mountain.earth1
root@desktop1-ubuntu18-04-x-tsikada-east-siberian-mountain:~# hostname
desktop1-ubuntu18-04-x.tsikada-east-siberian-mountain.earth1
root@desktop1-ubuntu18-04-x-tsikada-east-siberian-mountain:~# apt install -f
# .... ....
Your fully qualified host name is desktop1-ubuntu18-04-x.tsikada-east-siberian-mountain.earth1.
# .... ....
W: APT had planned for dpkg to do more than it reported back (3 vs 7).
   Affected packages: qmail:amd64

For more info on configuring FQDNs, search, or see https://www.digitalocean.com/community/questions/how-to-set-a-persistant-fqdn-for-an-ubuntu-18-04-droplet, or see for additional info this post.