mail-in-a-box / mailinabox

Mail-in-a-Box helps individuals take back control of their email by defining a one-click, easy-to-deploy SMTP+everything else server: a mail server in a box.
https://mailinabox.email/
Creative Commons Zero v1.0 Universal
13.85k stars 1.43k forks source link

Libcurl issue when using ubuntu_bionic on 18.04 #1446

Open KeiroD opened 5 years ago

KeiroD commented 5 years ago

Seems there's an issue with libcurl4/libcurl3 with php 7.2:

FAILED: apt-get -y -o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confnew install python3 python3-dev python3-pip netcat-openbsd wget curl git sudo coreutils bc haveged pollinate unzip unattended-upgrades cron ntp fail2ban
-----------------------------------------
Reading package lists...
Building dependency tree...
Reading state information...
bc is already the newest version (1.07.1-2).
coreutils is already the newest version (8.28-1ubuntu1).
cron is already the newest version (3.0pl1-128.1ubuntu1).
sudo is already the newest version (1.8.21p2-3ubuntu1).
unzip is already the newest version (6.0-21ubuntu1).
fail2ban is already the newest version (0.10.2-2).
haveged is already the newest version (1.9.1-6).
git is already the newest version (1:2.17.1-1ubuntu0.3).
netcat-openbsd is already the newest version (1.187-1ubuntu0.1).
python3 is already the newest version (3.6.5-3ubuntu1).
python3-dev is already the newest version (3.6.5-3ubuntu1).
unattended-upgrades is already the newest version (1.1ubuntu1.18.04.5).
wget is already the newest version (1.19.4-1ubuntu2.1).
ntp is already the newest version (1:4.2.8p10+dfsg-5ubuntu7.1).
python3-pip is already the newest version (9.0.1-2.3~ubuntu1).
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 curl : Depends: libcurl4 (= 7.58.0-2ubuntu3.3) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
-----------------------------------------
root@mail:~/mailinabox# apt install libcurl4
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  libcurl3 php-curl php7.2-curl
The following NEW packages will be installed:
  libcurl4
0 upgraded, 1 newly installed, 3 to remove and 20 not upgraded.
Need to get 0 B/214 kB of archives.
After this operation, 196 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 107841 files and directories currently installed.)
Removing php-curl (2:7.2+67+ubuntu14.04.1+deb.sury.org+0) ...
Removing php7.2-curl (7.2.11-2+ubuntu14.04.1+deb.sury.org+1) ...
Removing libcurl3:amd64 (7.58.0-2ubuntu2) ...
Selecting previously unselected package libcurl4:amd64.
(Reading database ... 107823 files and directories currently installed.)
Preparing to unpack .../libcurl4_7.58.0-2ubuntu3.3_amd64.deb ...
Unpacking libcurl4:amd64 (7.58.0-2ubuntu3.3) ...
Processing triggers for php7.2-fpm (7.2.11-2+ubuntu14.04.1+deb.sury.org+1) ...
Setting up libcurl4:amd64 (7.58.0-2ubuntu3.3) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
root@mail:~/mailinabox# ./setup/start.sh

From here, I reinstall the package it asks for and...

Updating system packages...
Installing system packages...
Initializing system random number generator...
WARN: Duplicate profile 'Dovecot IMAP', using last found
WARN: Duplicate profile 'Dovecot Secure IMAP', using last found
WARN: Duplicate profile 'Dovecot POP3', using last found
WARN: Duplicate profile 'Dovecot Secure POP3', using last found
Opening alternate SSH port 2200.
WARN: Duplicate profile 'Dovecot IMAP', using last found
WARN: Duplicate profile 'Dovecot Secure IMAP', using last found
WARN: Duplicate profile 'Dovecot POP3', using last found
WARN: Duplicate profile 'Dovecot Secure POP3', using last found
WARN: Duplicate profile 'Dovecot IMAP', using last found
WARN: Duplicate profile 'Dovecot Secure IMAP', using last found
WARN: Duplicate profile 'Dovecot POP3', using last found
WARN: Duplicate profile 'Dovecot Secure POP3', using last found
Firewall is active and enabled on system startup
Installing nsd (DNS server)...
WARN: Duplicate profile 'Dovecot IMAP', using last found
WARN: Duplicate profile 'Dovecot Secure IMAP', using last found
WARN: Duplicate profile 'Dovecot POP3', using last found
WARN: Duplicate profile 'Dovecot Secure POP3', using last found
Installing Postfix (SMTP server)...
WARN: Duplicate profile 'Dovecot IMAP', using last found
WARN: Duplicate profile 'Dovecot Secure IMAP', using last found
WARN: Duplicate profile 'Dovecot POP3', using last found
WARN: Duplicate profile 'Dovecot Secure POP3', using last found
WARN: Duplicate profile 'Dovecot IMAP', using last found
WARN: Duplicate profile 'Dovecot Secure IMAP', using last found
WARN: Duplicate profile 'Dovecot POP3', using last found
WARN: Duplicate profile 'Dovecot Secure POP3', using last found
Installing Dovecot (IMAP server)...
WARN: Duplicate profile 'Dovecot IMAP', using last found
WARN: Duplicate profile 'Dovecot Secure IMAP', using last found
WARN: Duplicate profile 'Dovecot POP3', using last found
WARN: Duplicate profile 'Dovecot Secure POP3', using last found
WARN: Duplicate profile 'Dovecot IMAP', using last found
WARN: Duplicate profile 'Dovecot Secure IMAP', using last found
WARN: Duplicate profile 'Dovecot POP3', using last found
WARN: Duplicate profile 'Dovecot Secure POP3', using last found
WARN: Duplicate profile 'Dovecot IMAP', using last found
WARN: Duplicate profile 'Dovecot Secure IMAP', using last found
WARN: Duplicate profile 'Dovecot POP3', using last found
WARN: Duplicate profile 'Dovecot Secure POP3', using last found
Installing OpenDKIM/OpenDMARC...
Installing SpamAssassin...
Installing Nginx (web server)...
WARN: Duplicate profile 'Dovecot IMAP', using last found
WARN: Duplicate profile 'Dovecot Secure IMAP', using last found
WARN: Duplicate profile 'Dovecot POP3', using last found
WARN: Duplicate profile 'Dovecot Secure POP3', using last found
WARN: Duplicate profile 'Dovecot IMAP', using last found
WARN: Duplicate profile 'Dovecot Secure IMAP', using last found
WARN: Duplicate profile 'Dovecot POP3', using last found
WARN: Duplicate profile 'Dovecot Secure POP3', using last found
Installing Roundcube (webmail)...

FAILED: apt-get -y -o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confnew install dbconfig-common php-cli php-sqlite3 php-intl php-json php-common php-curl php-gd php-pspell tinymce libjs-jquery libjs-jquery-mousewheel libmagic1 php-mbstring
-----------------------------------------
Reading package lists...
Building dependency tree...
Reading state information...
dbconfig-common is already the newest version (2.0.9).
libjs-jquery is already the newest version (3.2.1-1).
libjs-jquery-mousewheel is already the newest version (12-1).
tinymce is already the newest version (3.4.8+dfsg0-2).
libmagic1 is already the newest version (1:5.32-2ubuntu0.1).
php-common is already the newest version (2:67+ubuntu14.04.1+deb.sury.org+0).
php-common set to manually installed.
php-cli is already the newest version (2:7.2+67+ubuntu14.04.1+deb.sury.org+0).
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 php-curl : Depends: php7.2-curl but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
-----------------------------------------
root@mail:~/mailinabox# apt install php-curl
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 php-curl : Depends: php7.2-curl but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
root@mail:~/mailinabox# apt install php7.2-curl
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 php7.2-curl : Depends: libcurl3 (>= 7.28.0) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

... Bit of a chicken and egg problem here.

KeiroD commented 5 years ago

Hmmm... seems to be mainly due to using PHP 7.2 on this server. I'm still working out how to fix this, but I noticed the following:

root@mail:~/mailinabox/setup# grep php-curl -r
nextcloud.sh:   php-cli php-sqlite3 php-gd php-imap php-curl php-pear curl \
webmail.sh:     php-cli php-sqlite3 php-intl php-json php-common php-curl \

This will probably need to be updated so someone doesn't get caught in the php and php7.2 loop hell that I'm in. There appears to be PHP 7.2 variants of the same but I'm not sure if php-fpm will work here.

Hmm. Working through the install, it seems libcurl3 gets uninstalled by one of the other packages... working on figuring out which one's doing that.

Edit2: apt logs doesn't indicate which part of the script is causing libcurl4 to be installed, thereby removing libcurl3 in the process. Here's what happens whenever I run ./setup/start.sh:

Log started: 2018-10-22  18:56:09
(Reading database ... ^M(Reading database ... 5%^M(Reading database ... 10%^M(Reading database ... 15%^M(Reading database ... 20%^M(Reading database ... 25%^M(Reading database ... 30%^M(Reading database ... 35%^M(Reading database ... 40%^M(Reading database ... 45%^M(Reading database ... 50%^M(Reading database ... 55%^M(Reading database ... 60%^M(Reading database ... 65%^M(Reading database ... 70%^M(Reading database ... 75%^M(Reading database ... 80%^M(Reading database ... 85%^M(Reading database ... 90%^M(Reading database ... 95%^M(Reading database ... 100%^M(Reading database ... 108361 files and directories currently installed.)
Removing libcurl3:amd64 (7.58.0-2ubuntu2) ...
Selecting previously unselected package libcurl4:amd64.
(Reading database ... ^M(Reading database ... 5%^M(Reading database ... 10%^M(Reading database ... 15%^M(Reading database ... 20%^M(Reading database ... 25%^M(Reading database ... 30%^M(Reading database ... 35%^M(Reading database ... 40%^M(Reading database ... 45%^M(Reading database ... 50%^M(Reading database ... 55%^M(Reading database ... 60%^M(Reading database ... 65%^M(Reading database ... 70%^M(Reading database ... 75%^M(Reading database ... 80%^M(Reading database ... 85%^M(Reading database ... 90%^M(Reading database ... 95%^M(Reading database ... 100%^M(Reading database ... 108355 files and directories currently installed.)
Preparing to unpack .../libcurl4_7.58.0-2ubuntu3.3_amd64.deb ...
Unpacking libcurl4:amd64 (7.58.0-2ubuntu3.3) ...
Selecting previously unselected package curl.
Preparing to unpack .../curl_7.58.0-2ubuntu3.3_amd64.deb ...
Unpacking curl (7.58.0-2ubuntu3.3) ...
Selecting previously unselected package pollinate.
Preparing to unpack .../pollinate_4.33-0ubuntu1~18.04.1_all.deb ...
Unpacking pollinate (4.33-0ubuntu1~18.04.1) ...
Setting up libcurl4:amd64 (7.58.0-2ubuntu3.3) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Processing triggers for man-db (2.8.3-2) ...
Setting up curl (7.58.0-2ubuntu3.3) ...
Setting up pollinate (4.33-0ubuntu1~18.04.1) ...
Log ended: 2018-10-22  18:56:15

Edit3: Hmm... so removing php7.2-curl from the script and manually installing it still causes curl to be installed, forcefully removing libcurl3. I'm unable to determine exactly what other bit is installing curl, which is irritating.

Edit4: Seems something in the nextcloud configuration is preventing MIAB from properly working...

Let me know if you want access to the server.