Error when updating using apt.

Stan Hammond

New Member
Oct 15, 2018
1
0
1
47
Recently I have been getting an error when I try to update the Proxmox Mail Gateway:
Setting up pmg-api (5.1-2) ...
setuid postgres (110) failed - Inappropriate ioctl for device
dpkg: error processing package pmg-api (--configure):
subprocess installed post-installation script returned error exit status 25
dpkg: dependency problems prevent configuration of proxmox-mailgateway:
proxmox-mailgateway depends on pmg-api; however:
Package pmg-api is not configured yet.

dpkg: error processing package proxmox-mailgateway (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
pmg-api
proxmox-mailgateway
E: Sub-process /usr/bin/dpkg returned an error code (1)

The system is running, but I would like to find out why the pmg-api package is not updating or why it is trying to do a setuid for postgres.
This installation was done by adding the repository for Proxmox Mail Gateway to a Debian Stretch installation.
Postgresql version is 9.6.
Prior to the updating, I have been running Proxmox Mail Gateway 5.0 without any issues.
 
pls post the full log, including the command you run.

what do you get with:

> apt-get update
 
Meine Fehlermeldung, hier steht etwas von hostname lookup, deshalb mal die FQDN des Servers:

Code:
 # hostname -f
mail.der-space.de

 # hostname
mail


Code:
ing up libpve-apiclient-perl (3.0-3) ...
Setting up proxmox-spamassassin (3.4.4-2) ...
Setting up libxml-parser-perl (2.44-4) ...
Setting up libxml-twig-perl (1:3.50-1.1) ...
Setting up libnet-dbus-perl (1.1.0-5+b1) ...
Setting up libpve-common-perl (6.2-2) ...
Setting up libpve-http-server-perl (3.0-6) ...
Setting up pve-xtermjs (4.3.0-1) ...
Setting up pmg-api (6.2-5) ...

Configuration file '/etc/apt/sources.list.d/pmg-enterprise.list'
 ==> File on system created by you or by a script.
 ==> File also in package provided by package maintainer.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
*** pmg-enterprise.list (Y/I/N/O/D/Z) [default=N] ? n
Use of uninitialized value $ip in concatenation (.) or string at /usr/share/perl5/PVE/Network.pm line 639.
hostname lookup 'pmg' failed - got local IP address ''
dpkg: error processing package pmg-api (--configure):
 installed pmg-api package post-installation script subprocess returned error exit status 22
dpkg: dependency problems prevent configuration of proxmox-mailgateway-container:
 proxmox-mailgateway-container depends on pmg-api; however:
  Package pmg-api is not configured yet.

dpkg: error processing package proxmox-mailgateway-container (--configure):
 dependency problems - leaving unconfigured
Processing triggers for systemd (241-7~deb10u4) ...
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for mime-support (3.62) ...
Processing triggers for libc-bin (2.28-10) ...
Errors were encountered while processing:
 pmg-api
 proxmox-mailgateway-container
E: Sub-process /usr/bin/dpkg returned an error code (1)

 100 pmg.der-space.prod:/root
 # dpkg-reconfigure pmg-
pmg-docs         pmg-gui          pmg-i18n         pmg-log-tracker 

 # apt install -f
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up pmg-api (6.2-5) ...
Use of uninitialized value $ip in concatenation (.) or string at /usr/share/perl5/PVE/Network.pm line 639.
hostname lookup 'pmg' failed - got local IP address ''
dpkg: error processing package pmg-api (--configure):
 installed pmg-api package post-installation script subprocess returned error exit status 22
dpkg: dependency problems prevent configuration of proxmox-mailgateway-container:
 proxmox-mailgateway-container depends on pmg-api; however:
  Package pmg-api is not configured yet.

dpkg: error processing package proxmox-mailgateway-container (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 pmg-api
 proxmox-mailgateway-container
E: Sub-process /usr/bin/dpkg returned an error code (1)
 
Meine Fehlermeldung, hier steht etwas von hostname lookup, deshalb mal die FQDN des Servers:

Code:
# hostname -f
mail.der-space.de

# hostname
mail


Code:
ing up libpve-apiclient-perl (3.0-3) ...
Setting up proxmox-spamassassin (3.4.4-2) ...
Setting up libxml-parser-perl (2.44-4) ...
Setting up libxml-twig-perl (1:3.50-1.1) ...
Setting up libnet-dbus-perl (1.1.0-5+b1) ...
Setting up libpve-common-perl (6.2-2) ...
Setting up libpve-http-server-perl (3.0-6) ...
Setting up pve-xtermjs (4.3.0-1) ...
Setting up pmg-api (6.2-5) ...

Configuration file '/etc/apt/sources.list.d/pmg-enterprise.list'
==> File on system created by you or by a script.
==> File also in package provided by package maintainer.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
The default action is to keep your current version.
*** pmg-enterprise.list (Y/I/N/O/D/Z) [default=N] ? n
Use of uninitialized value $ip in concatenation (.) or string at /usr/share/perl5/PVE/Network.pm line 639.
hostname lookup 'pmg' failed - got local IP address ''
dpkg: error processing package pmg-api (--configure):
installed pmg-api package post-installation script subprocess returned error exit status 22
dpkg: dependency problems prevent configuration of proxmox-mailgateway-container:
proxmox-mailgateway-container depends on pmg-api; however:
  Package pmg-api is not configured yet.

dpkg: error processing package proxmox-mailgateway-container (--configure):
dependency problems - leaving unconfigured
Processing triggers for systemd (241-7~deb10u4) ...
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for mime-support (3.62) ...
Processing triggers for libc-bin (2.28-10) ...
Errors were encountered while processing:
pmg-api
proxmox-mailgateway-container
E: Sub-process /usr/bin/dpkg returned an error code (1)

100 pmg.der-space.prod:/root
# dpkg-reconfigure pmg-
pmg-docs         pmg-gui          pmg-i18n         pmg-log-tracker

# apt install -f
Reading package lists... Done
Building dependency tree      
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up pmg-api (6.2-5) ...
Use of uninitialized value $ip in concatenation (.) or string at /usr/share/perl5/PVE/Network.pm line 639.
hostname lookup 'pmg' failed - got local IP address ''
dpkg: error processing package pmg-api (--configure):
installed pmg-api package post-installation script subprocess returned error exit status 22
dpkg: dependency problems prevent configuration of proxmox-mailgateway-container:
proxmox-mailgateway-container depends on pmg-api; however:
  Package pmg-api is not configured yet.

dpkg: error processing package proxmox-mailgateway-container (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
pmg-api
proxmox-mailgateway-container
E: Sub-process /usr/bin/dpkg returned an error code (1)


what is your /etc/hosts file content?
 
what is your /etc/hosts file content?
Code:
127.0.0.1    localhost
::1        localhost ip6-localhost ip6-loopback
ff02::1        ip6-allnodes
ff02::2        ip6-allrouters
# --- BEGIN PVE ---
127.0.1.1 mail.der-space.de mail
# --- END PVE ---
 
Oh thanks for the hint, here is something missing, put the ip and FQDN and run apt install proxmox-mailgateway-container again
 
glad it worked :)
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!