Dist Upgrade to Buster failing - php

I currently have a Dockerfile which has started to failing (with no changes in the Dockerfile)
The Dockerfile has the following contents:
FROM php:apache-stretch
WORKDIR /tmp
# SOFTWARE REQS
RUN sed -i 's/stretch/buster/g' /etc/apt/sources.list && \
apt-get update && \
apt-get install apt-utils -y && \
apt-get dist-upgrade -y && \
apt autoremove -y && \
apt-get upgrade -y && \
apt-get install -y libicu-dev zip git vim && \
pecl channel-update pecl.php.net && \
printf "\n" | pecl install redis-3.1.6 && \
docker-php-ext-configure intl && \
docker-php-ext-install intl && \
docker-php-ext-configure opcache && \
docker-php-ext-install opcache && \
docker-php-ext-install pdo pdo_mysql && \
docker-php-ext-enable redis
After running the commands individually, the failing command seems to be with the dist-upgrade.
root#php3:/var/www/html# apt-get dist-upgrade -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
g++-6 libperl5.24 libstdc++-6-dev libustr-1.0-1 perl-modules-5.24
Use 'apt autoremove' to remove them.
The following NEW packages will be installed:
binutils-common binutils-x86-64-linux-gnu cpp-7 e2fsprogs-l10n fdisk g++-7 gcc-7 gcc-7-base libasan4 libbinutils libbrotli1 libgcc-7-dev libperl5.26 libstdc++-7-dev libunistring2 perl-modules-5.26
The following packages will be upgraded:
adduser apache2 apache2-bin apache2-data apache2-utils autoconf base-files base-passwd binutils bsdutils ca-certificates coreutils cpp cpp-6 curl dash debconf debian-archive-keyring debianutils diffutils dpkg dpkg-dev
e2fslibs e2fsprogs file findutils g++ g++-6 gcc gcc-6 gcc-6-base gpgv grep init-system-helpers libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap libargon2-0 libasan3 libatomic1 libaudit-common libaudit1 libblkid1
libbsd0 libc-bin libc-dev-bin libc6 libc6-dev libcap-ng0 libcc1-0 libcilkrts5 libcomerr2 libcurl3 libdb5.3 libdebconfclient0 libdpkg-perl libedit2 libexpat1 libfdisk1 libffi6 libgcc-6-dev libgcc1 libgcrypt20 libglib2.0-0
libgmp10 libgnutls30 libgomp1 libgpg-error0 libgssapi-krb5-2 libhogweed4 libicu57 libidn11 libidn2-0 libitm1 libk5crypto3 libkeyutils1 libkrb5-3 libkrb5support0 libldap-2.4-2 libldap-common liblsan0 liblzma5 libmagic-mgc
libmagic1 libmount1 libmpc3 libmpfr4 libmpx2 libncurses5 libncursesw5 libnettle6 libnghttp2-14 libp11-kit0 libpcre3 libpsl5 libquadmath0 libselinux1 libsemanage-common libsemanage1 libsepol1 libsigsegv2 libsmartcols1
libsqlite3-0 libss2 libssh2-1 libssl1.0.2 libssl1.1 libstdc++-6-dev libstdc++6 libsystemd0 libtasn1-6 libtinfo5 libtsan0 libubsan0 libudev1 libuuid1 libxml2 linux-libc-dev login lsb-base mount multiarch-support ncurses-base
ncurses-bin openssl passwd perl perl-base re2c sensible-utils sysvinit-utils tar tzdata util-linux xz-utils
136 upgraded, 16 newly installed, 0 to remove and 0 not upgraded.
Need to get 116 MB of archives.
After this operation, 152 MB of additional disk space will be used.
Get:1 http://cdn-fastly.deb.debian.org/debian buster/main amd64 base-files amd64 10.1 [69.4 kB]
Get:2 http://cdn-fastly.deb.debian.org/debian buster/main amd64 bsdutils amd64 1:2.30.2-0.3 [116 kB]
Get:3 http://cdn-fastly.deb.debian.org/debian buster/main amd64 coreutils amd64 8.28-1 [2686 kB]
Get:4 http://cdn-fastly.deb.debian.org/debian buster/main amd64 debianutils amd64 4.8.4 [100 kB]
Get:5 http://cdn-fastly.deb.debian.org/debian buster/main amd64 tar amd64 1.29b-2 [760 kB]
Get:6 http://cdn-fastly.deb.debian.org/debian buster/main amd64 dpkg amd64 1.19.0.5 [2133 kB]
Get:7 http://cdn-fastly.deb.debian.org/debian buster/main amd64 dash amd64 0.5.8-2.10 [113 kB]
Get:8 http://cdn-fastly.deb.debian.org/debian buster/main amd64 diffutils amd64 1:3.6-1 [328 kB]
Get:9 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libc6-dev amd64 2.26-4 [2606 kB]
Get:10 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libc-dev-bin amd64 2.26-4 [266 kB]
Get:11 http://cdn-fastly.deb.debian.org/debian buster/main amd64 linux-libc-dev amd64 4.14.13-1 [1376 kB]
Get:12 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libc6 amd64 2.26-4 [2868 kB]
Get:13 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libc-bin amd64 2.26-4 [764 kB]
Get:14 http://cdn-fastly.deb.debian.org/debian buster/main amd64 gcc-7-base amd64 7.2.0-19 [184 kB]
Get:15 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libgcc1 amd64 1:7.2.0-19 [39.3 kB]
Get:16 http://cdn-fastly.deb.debian.org/debian buster/main amd64 e2fslibs amd64 1.43.8-2 [214 kB]
Get:17 http://cdn-fastly.deb.debian.org/debian buster/main amd64 e2fsprogs amd64 1.43.8-2 [559 kB]
Get:18 http://cdn-fastly.deb.debian.org/debian buster/main amd64 findutils amd64 4.6.0+git+20170828-2 [633 kB]
Get:19 http://cdn-fastly.deb.debian.org/debian buster/main amd64 grep amd64 3.1-2 [378 kB]
Get:20 http://cdn-fastly.deb.debian.org/debian buster/main amd64 login amd64 1:4.5-1 [794 kB]
Get:21 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libuuid1 amd64 2.30.2-0.3 [70.7 kB]
Get:22 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libblkid1 amd64 2.30.2-0.3 [177 kB]
Get:23 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libpcre3 amd64 2:8.39-8 [339 kB]
Get:24 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libselinux1 amd64 2.7-2 [86.0 kB]
Get:25 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libmount1 amd64 2.30.2-0.3 [191 kB]
Get:26 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libsmartcols1 amd64 2.30.2-0.3 [136 kB]
Get:27 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libfdisk1 amd64 2.30.2-0.3 [216 kB]
Get:28 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libncurses5 amd64 6.0+20171125-1 [95.7 kB]
Get:29 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libtinfo5 amd64 6.0+20171125-1 [313 kB]
Get:30 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libncursesw5 amd64 6.0+20171125-1 [118 kB]
Get:31 http://cdn-fastly.deb.debian.org/debian buster/main amd64 fdisk amd64 2.30.2-0.3 [164 kB]
Get:32 http://cdn-fastly.deb.debian.org/debian buster/main amd64 util-linux amd64 2.30.2-0.3 [933 kB]
Get:33 http://cdn-fastly.deb.debian.org/debian buster/main amd64 mount amd64 2.30.2-0.3 [169 kB]
Get:34 http://cdn-fastly.deb.debian.org/debian buster/main amd64 ncurses-bin amd64 6.0+20171125-1 [397 kB]
Get:35 http://cdn-fastly.deb.debian.org/debian buster/main amd64 perl-modules-5.26 all 5.26.1-4 [2822 kB]
Get:36 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libperl5.26 amd64 5.26.1-4 [3595 kB]
Get:37 http://cdn-fastly.deb.debian.org/debian buster/main amd64 perl amd64 5.26.1-4 [201 kB]
Get:38 http://cdn-fastly.deb.debian.org/debian buster/main amd64 perl-base amd64 5.26.1-4 [1389 kB]
Get:39 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libdb5.3 amd64 5.3.28-13.1+b1 [683 kB]
Get:40 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libdebconfclient0 amd64 0.238 [48.2 kB]
Get:41 http://cdn-fastly.deb.debian.org/debian buster/main amd64 base-passwd amd64 3.5.44 [57.9 kB]
Get:42 http://cdn-fastly.deb.debian.org/debian buster/main amd64 init-system-helpers all 1.51 [44.3 kB]
Get:43 http://cdn-fastly.deb.debian.org/debian buster/main amd64 ncurses-base all 6.0+20171125-1 [249 kB]
Get:44 http://cdn-fastly.deb.debian.org/debian buster/main amd64 sysvinit-utils amd64 2.88dsf-59.10 [68.3 kB]
Get:45 http://cdn-fastly.deb.debian.org/debian buster/main amd64 debconf all 1.5.65 [147 kB]
Get:46 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libgpg-error0 amd64 1.27-5 [115 kB]
Get:47 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libgcrypt20 amd64 1.8.1-4 [550 kB]
Get:48 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libsystemd0 amd64 236-3 [271 kB]
Get:49 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libtasn1-6 amd64 4.13-2 [51.8 kB]
Get:50 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libunistring2 amd64 0.9.8-1 [386 kB]
Get:51 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libgmp10 amd64 2:6.1.2+dfsg-2 [254 kB]
Get:52 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libnettle6 amd64 3.4-1 [211 kB]
Get:53 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libhogweed4 amd64 3.4-1 [138 kB]
Get:54 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libidn2-0 amd64 2.0.4-1.1 [61.4 kB]
Get:55 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libffi6 amd64 3.2.1-8 [20.7 kB]
Get:56 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libp11-kit0 amd64 0.23.9-2 [194 kB]
Get:57 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libgnutls30 amd64 3.5.17-1 [885 kB]
Get:58 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libldap-common all 2.4.45+dfsg-1 [87.0 kB]
Get:59 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libldap-2.4-2 amd64 2.4.45+dfsg-1 [223 kB]
Get:60 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libaprutil1-ldap amd64 1.6.1-1 [16.3 kB]
Get:61 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libsqlite3-0 amd64 3.22.0-1 [595 kB]
Get:62 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libaprutil1-dbd-sqlite3 amd64 1.6.1-1 [18.2 kB]
Get:63 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libexpat1 amd64 2.2.5-3 [96.8 kB]
Get:64 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libssl1.1 amd64 1.1.0g-2 [1346 kB]
Get:65 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libaprutil1 amd64 1.6.1-1 [91.1 kB]
Get:66 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libapr1 amd64 1.6.3-1 [100 kB]
Get:67 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libbrotli1 amd64 1.0.2-2 [264 kB]
Get:68 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libnghttp2-14 amd64 1.29.0-1 [81.7 kB]
Get:69 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libstdc++6 amd64 7.2.0-19 [391 kB]
Get:70 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libicu57 amd64 57.1-8 [7699 kB]
Get:71 http://cdn-fastly.deb.debian.org/debian buster/main amd64 liblzma5 amd64 5.2.2-1.3 [234 kB]
Get:72 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libxml2 amd64 2.9.4+dfsg1-6.1 [725 kB]
Get:73 http://cdn-fastly.deb.debian.org/debian buster/main amd64 apache2 amd64 2.4.29-2 [241 kB]
Get:74 http://cdn-fastly.deb.debian.org/debian buster/main amd64 apache2-bin amd64 2.4.29-2 [1217 kB]
Get:75 http://cdn-fastly.deb.debian.org/debian buster/main amd64 apache2-data all 2.4.29-2 [161 kB]
Get:76 http://cdn-fastly.deb.debian.org/debian buster/main amd64 apache2-utils amd64 2.4.29-2 [224 kB]
Get:77 http://cdn-fastly.deb.debian.org/debian buster/main amd64 lsb-base all 9.20170808 [28.1 kB]
Get:78 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libaudit-common all 1:2.8.2-1 [21.5 kB]
Get:79 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libcap-ng0 amd64 0.7.7-3.1+b1 [14.0 kB]
Get:80 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libaudit1 amd64 1:2.8.2-1 [56.5 kB]
Get:81 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libsepol1 amd64 2.7-1 [261 kB]
Get:82 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libsemanage-common all 2.7-2 [17.4 kB]
Get:83 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libsemanage1 amd64 2.7-2 [96.0 kB]
Get:84 http://cdn-fastly.deb.debian.org/debian buster/main amd64 passwd amd64 1:4.5-1 [1005 kB]
Get:85 http://cdn-fastly.deb.debian.org/debian buster/main amd64 adduser all 3.116 [242 kB]
Get:86 http://cdn-fastly.deb.debian.org/debian buster/main amd64 debian-archive-keyring all 2017.7 [56.9 kB]
Get:87 http://cdn-fastly.deb.debian.org/debian buster/main amd64 gpgv amd64 2.2.4-1 [560 kB]
Get:88 http://cdn-fastly.deb.debian.org/debian buster/main amd64 sensible-utils all 0.0.11 [15.7 kB]
Get:89 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libcomerr2 amd64 1.43.8-2 [66.1 kB]
Get:90 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libss2 amd64 1.43.8-2 [70.5 kB]
Get:91 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libudev1 amd64 236-3 [127 kB]
Get:92 http://cdn-fastly.deb.debian.org/debian buster/main amd64 tzdata all 2018c-1 [250 kB]
Get:93 http://cdn-fastly.deb.debian.org/debian buster/main amd64 file amd64 1:5.32-1 [64.4 kB]
Get:94 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libmagic1 amd64 1:5.32-1 [111 kB]
Get:95 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libmagic-mgc amd64 1:5.32-1 [225 kB]
Get:96 http://cdn-fastly.deb.debian.org/debian buster/main amd64 xz-utils amd64 5.2.2-1.3 [266 kB]
Get:97 http://cdn-fastly.deb.debian.org/debian buster/main amd64 autoconf all 2.69-11 [341 kB]
Get:98 http://cdn-fastly.deb.debian.org/debian buster/main amd64 binutils amd64 2.29.1-13 [52.6 kB]
Get:99 http://cdn-fastly.deb.debian.org/debian buster/main amd64 binutils-common amd64 2.29.1-13 [1819 kB]
Get:100 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libbinutils amd64 2.29.1-13 [499 kB]
Get:101 http://cdn-fastly.deb.debian.org/debian buster/main amd64 binutils-x86-64-linux-gnu amd64 2.29.1-13 [1801 kB]
Get:102 http://cdn-fastly.deb.debian.org/debian buster/main amd64 openssl amd64 1.1.0g-2 [741 kB]
Get:103 http://cdn-fastly.deb.debian.org/debian buster/main amd64 ca-certificates all 20170717 [178 kB]
Get:104 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libmpfr4 amd64 3.1.6-1 [564 kB]
Get:105 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libmpc3 amd64 1.0.3-2 [40.1 kB]
Get:106 http://cdn-fastly.deb.debian.org/debian buster/main amd64 cpp-7 amd64 7.2.0-19 [6700 kB]
Get:107 http://cdn-fastly.deb.debian.org/debian buster/main amd64 cpp amd64 4:7.2.0-1d1 [18.9 kB]
Get:108 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libquadmath0 amd64 7.2.0-19 [132 kB]
Get:109 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libitm1 amd64 7.2.0-19 [27.3 kB]
Get:110 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libmpx2 amd64 7.2.0-19 [11.5 kB]
Get:111 http://cdn-fastly.deb.debian.org/debian buster/main amd64 liblsan0 amd64 7.2.0-19 [131 kB]
Get:112 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libtsan0 amd64 7.2.0-19 [276 kB]
Get:113 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libubsan0 amd64 7.2.0-19 [124 kB]
Get:114 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libcilkrts5 amd64 7.2.0-19 [42.1 kB]
Get:115 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libgomp1 amd64 7.2.0-19 [75.2 kB]
Get:116 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libatomic1 amd64 7.2.0-19 [8884 B]
Get:117 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libasan3 amd64 6.4.0-11 [310 kB]
Get:118 http://cdn-fastly.deb.debian.org/debian buster/main amd64 g++-6 amd64 6.4.0-11 [6895 kB]
Get:119 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libstdc++-6-dev amd64 6.4.0-11 [1421 kB]
Get:120 http://cdn-fastly.deb.debian.org/debian buster/main amd64 gcc-6 amd64 6.4.0-11 [6721 kB]
Get:121 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libgcc-6-dev amd64 6.4.0-11 [2298 kB]
Get:122 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libcc1-0 amd64 7.2.0-19 [37.8 kB]
Get:123 http://cdn-fastly.deb.debian.org/debian buster/main amd64 cpp-6 amd64 6.4.0-11 [6354 kB]
Get:124 http://cdn-fastly.deb.debian.org/debian buster/main amd64 gcc-6-base amd64 6.4.0-11 [182 kB]
Get:125 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libkeyutils1 amd64 1.5.9-9.2 [12.9 kB]
Get:126 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libgssapi-krb5-2 amd64 1.16-2 [158 kB]
Get:127 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libkrb5-3 amd64 1.16-2 [316 kB]
Get:128 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libk5crypto3 amd64 1.16-2 [121 kB]
Get:129 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libkrb5support0 amd64 1.16-2 [62.8 kB]
Get:130 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libpsl5 amd64 0.19.1-4 [44.4 kB]
Get:131 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libssh2-1 amd64 1.8.0-1 [138 kB]
Get:132 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libssl1.0.2 amd64 1.0.2n-1 [1296 kB]
Get:133 http://cdn-fastly.deb.debian.org/debian buster/main amd64 curl amd64 7.58.0-2 [248 kB]
Get:134 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libcurl3 amd64 7.58.0-2 [312 kB]
Get:135 http://cdn-fastly.deb.debian.org/debian buster/main amd64 dpkg-dev all 1.19.0.5 [1619 kB]
Get:136 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libdpkg-perl all 1.19.0.5 [1315 kB]
Get:137 http://cdn-fastly.deb.debian.org/debian buster/main amd64 e2fsprogs-l10n all 1.43.8-2 [487 kB]
Get:138 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libasan4 amd64 7.2.0-19 [354 kB]
Get:139 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libgcc-7-dev amd64 7.2.0-19 [2369 kB]
Get:140 http://cdn-fastly.deb.debian.org/debian buster/main amd64 gcc-7 amd64 7.2.0-19 [7091 kB]
Get:141 http://cdn-fastly.deb.debian.org/debian buster/main amd64 gcc amd64 4:7.2.0-1d1 [5102 B]
Get:142 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libstdc++-7-dev amd64 7.2.0-19 [1448 kB]
Get:143 http://cdn-fastly.deb.debian.org/debian buster/main amd64 g++-7 amd64 7.2.0-19 [7237 kB]
Get:144 http://cdn-fastly.deb.debian.org/debian buster/main amd64 g++ amd64 4:7.2.0-1d1 [1546 B]
Get:145 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libargon2-0 amd64 0~20161029-1.1 [20.2 kB]
Get:146 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libbsd0 amd64 0.8.7-1 [92.1 kB]
Get:147 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libedit2 amd64 3.1-20170329-1 [85.2 kB]
Get:148 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libglib2.0-0 amd64 2.54.3-2 [2822 kB]
Get:149 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libidn11 amd64 1.33-2.1 [116 kB]
Get:150 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libsigsegv2 amd64 2.11-1 [29.9 kB]
Get:151 http://cdn-fastly.deb.debian.org/debian buster/main amd64 multiarch-support amd64 2.26-4 [208 kB]
Get:152 http://cdn-fastly.deb.debian.org/debian buster/main amd64 re2c amd64 1.0.1-1 [280 kB]
Fetched 116 MB in 55s (2127 kB/s)
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76, <> line 152.)
debconf: falling back to frontend: Readline
Extracting templates from packages: 100%
Preconfiguring packages ...
(Reading database ... 13214 files and directories currently installed.)
Preparing to unpack .../base-files_10.1_amd64.deb ...
Unpacking base-files (10.1) over (9.9+deb9u3) ...
Setting up base-files (10.1) ...
Installing new version of config file /etc/debian_version ...
Installing new version of config file /etc/issue ...
Installing new version of config file /etc/issue.net ...
(Reading database ... 13215 files and directories currently installed.)
Preparing to unpack .../bsdutils_1%3a2.30.2-0.3_amd64.deb ...
Unpacking bsdutils (1:2.30.2-0.3) over (1:2.29.2-1) ...
Setting up bsdutils (1:2.30.2-0.3) ...
(Reading database ... 13215 files and directories currently installed.)
Preparing to unpack .../coreutils_8.28-1_amd64.deb ...
Unpacking coreutils (8.28-1) over (8.26-3) ...
Setting up coreutils (8.28-1) ...
(Reading database ... 13215 files and directories currently installed.)
Preparing to unpack .../debianutils_4.8.4_amd64.deb ...
Unpacking debianutils (4.8.4) over (4.8.1.1) ...
Setting up debianutils (4.8.4) ...
(Reading database ... 13215 files and directories currently installed.)
Preparing to unpack .../archives/tar_1.29b-2_amd64.deb ...
Unpacking tar (1.29b-2) over (1.29b-1.1) ...
Setting up tar (1.29b-2) ...
update-alternatives: warning: forcing reinstallation of alternative /usr/sbin/rmt-tar because link group rmt is broken
update-alternatives: warning: skip creation of /usr/share/man/man8/rmt.8.gz because associated file /usr/share/man/man8/rmt-tar.8.gz (of link group rmt) doesn't exist
(Reading database ... 13215 files and directories currently installed.)
Preparing to unpack .../dpkg_1.19.0.5_amd64.deb ...
Unpacking dpkg (1.19.0.5) over (1.18.24) ...
Setting up dpkg (1.19.0.5) ...
Installing new version of config file /etc/alternatives/README ...
Installing new version of config file /etc/cron.daily/dpkg ...
Installing new version of config file /etc/logrotate.d/dpkg ...
(Reading database ... 13219 files and directories currently installed.)
Preparing to unpack .../dash_0.5.8-2.10_amd64.deb ...
Removing 'diversion of /bin/sh to /bin/sh.distrib by dash'
Adding 'diversion of /bin/sh to /bin/sh.distrib by bash'
Removing 'diversion of /usr/share/man/man1/sh.1.gz to /usr/share/man/man1/sh.distrib.1.gz by dash'
Adding 'diversion of /usr/share/man/man1/sh.1.gz to /usr/share/man/man1/sh.distrib.1.gz by bash'
dash.preinst: cannot remove /usr/share/man/man1/sh.distrib.1.gz: No such file or directory
dpkg: error processing archive /var/cache/apt/archives/dash_0.5.8-2.10_amd64.deb (--unpack):
new dash package pre-installation script subprocess returned error exit status 1
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.)
debconf: falling back to frontend: Readline
Removing 'diversion of /bin/sh to /bin/sh.distrib by bash'
Adding 'diversion of /bin/sh to /bin/sh.distrib by dash'
Removing 'diversion of /usr/share/man/man1/sh.1.gz to /usr/share/man/man1/sh.distrib.1.gz by bash'
Adding 'diversion of /usr/share/man/man1/sh.1.gz to /usr/share/man/man1/sh.distrib.1.gz by dash'
ln: failed to create symbolic link '/usr/share/man/man1/sh.1.gz.tmp': No such file or directory
dpkg: error while cleaning up:
installed dash package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
/var/cache/apt/archives/dash_0.5.8-2.10_amd64.deb
W: http: aptMethod::Configuration: could not load seccomp policy: Invalid argument
W: http: aptMethod::Configuration: could not load seccomp policy: Invalid argument
E: Sub-process /usr/bin/dpkg returned an error code (1)
Although I can see the reason why it's failed (ie. missing file) I do not understand how to resolve.
When I look at the Dockerfile from when it last compiled successfully (4 days ago), it looked like this:
FROM php:apache-stretch
WORKDIR /tmp
# SOFTWARE REQS
RUN sed -i 's/stretch/buster/g' /etc/apt/sources.list && \
apt-get update && \
apt-get dist-upgrade -y && \
apt autoremove -y && \
apt-get upgrade -y && \
apt-get install -y libicu-dev zip git vim && \
pecl install redis-3.1.6 && \
docker-php-ext-configure intl && \
docker-php-ext-install intl && \
docker-php-ext-configure opcache && \
docker-php-ext-install opcache && \
docker-php-ext-install pdo pdo_mysql && \
docker-php-ext-enable redis
The differences between them have been made today in an effort to resolve. Am I missing anything? I expect that changing the sources.list and running apt-get dist-upgrade to work.

Although the solution I found works, it's not what I wanted.
I ended up getting off the buster repo. Serves me right for relying on the testing repo to be fully tested before deployed.
I can't wait for Curl 7.55 to be able to do curl -H #headerfile.txt instead of curl -H "$(cat headerfile.txt)"
It's the little things :)

Related

Windows 10: Docker build fails on apt-get upgrade with 403 authenticationrequired

I am trying to build a docker image for a php 5.6 application on my work machine. The initial steps on Dockerfile are as below:
FROM php:5.6-apache
RUN set -x \
&& apt-get update \
&& apt-get upgrade -y
When I run docker build I get the following output along with an error after the apt-get upgrade command:
#5 0.365 + apt-get update
#5 0.965 Get:1 http://security.debian.org/debian-security stretch/updates InRelease [59.1 kB]
#5 0.977 Ign:2 http://deb.debian.org/debian stretch InRelease
#5 1.223 Get:3 http://deb.debian.org/debian stretch-updates InRelease [93.6 kB]
#5 1.318 Get:4 http://security.debian.org/debian-security stretch/updates/main amd64 Packages [782 kB]
#5 1.478 Get:5 http://deb.debian.org/debian stretch Release [118 kB]
#5 1.784 Get:6 http://deb.debian.org/debian stretch Release.gpg [3177 B]
#5 1.999 Get:7 http://deb.debian.org/debian stretch/main amd64 Packages [7080 kB]
#5 5.073 Fetched 8135 kB in 4s (1742 kB/s)
#5 5.073 Reading package lists...
#5 5.686 + apt-get upgrade -y
#5 5.701 Reading package lists...
#5 6.318 Building dependency tree...
#5 6.433 Reading state information...
#5 6.444 Calculating upgrade...
#5 6.733 The following packages will be upgraded:
#5 6.733 apache2 apache2-bin apache2-data apache2-utils apt base-files
#5 6.733 ca-certificates curl debian-archive-keyring dpkg dpkg-dev e2fslibs e2fsprogs
#5 6.733 file gpgv gzip libapr1 libapt-pkg5.0 libbsd0 libc-bin libc-dev-bin libc6
#5 6.733 libc6-dev libcomerr2 libcurl3 libdpkg-perl libexpat1 libgcrypt20
#5 6.733 libglib2.0-0 libgmp10 libgnutls30 libgssapi-krb5-2 libhogweed4 libicu57
#5 6.733 libidn11 libk5crypto3 libkrb5-3 libkrb5support0 libldap-2.4-2 libldap-common
#5 6.733 liblz4-1 liblzma5 libmagic-mgc libmagic1 libnettle6 libnghttp2-14
#5 6.733 libp11-kit0 libperl5.24 libsasl2-2 libsasl2-modules-db libsqlite3-0 libss2
#5 6.733 libssh2-1 libssl1.0.2 libssl1.1 libsystemd0 libudev1 libxml2 linux-libc-dev
#5 6.733 login multiarch-support openssl passwd patch perl perl-base
#5 6.733 perl-modules-5.24 tar tzdata xz-utils zlib1g
#5 7.050 71 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
#5 7.050 Need to get 51.0 MB of archives.
#5 7.050 After this operation, 505 kB of additional disk space will be used.
#5 7.050 Get:1 http://security.debian.org/debian-security stretch/updates/main amd64 tar amd64 1.29b-1.1+deb9u1 [760 kB]
#5 7.062 Get:2 http://deb.debian.org/debian stretch/main amd64 base-files amd64 9.9+deb9u13 [67.6 kB]
#5 7.315 Get:3 http://deb.debian.org/debian stretch/main amd64 libc6-dev amd64 2.24-11+deb9u4 [2364 kB]
#5 8.159 Err:4 http://deb.debian.org/debian stretch/main amd64 libc-dev-bin amd64 2.24-11+deb9u4
#5 8.159 403 authenticationrequired
...
...
#5 9.424 Failed to fetch http://deb.debian.org/debian/pool/main/g/glibc/libc6_2.24-11+deb9u4_amd64.deb 403 authenticationrequired
#5 9.424 E: Failed to fetch http://security.debian.org/debian-security/pool/updates/main/e/e2fsprogs/e2fslibs_1.43.4-2+deb9u2_amd64.deb 403 authenticationrequired [IP: 151.101.194.132 80]
#5 9.424 E: Failed to fetch http://security.debian.org/debian-security/pool/updates/main/e/e2fsprogs/e2fsprogs_1.43.4-2+deb9u2_amd64.deb 403 authenticationrequired [IP: 151.101.194.132 80]
...
...
I know there is a missing config for my docker setup but not sure what it is. I tried installing Docker with wsl, uninstalled it and installed again with Hyper V , but the same issue. Any helpful pointers?
The workaround for this is to install docker CE on a WSL instance (I used ubuntu) on windows. Shutdown docker desktop on host windows machine. Then build the image on the WSL and push it to your docker registry. This way the image can be used anywhere.
Not sure why but docker desktop is not so useful in this case.

E: Package 'php-xmlrpc' has no installation candidate

Attempting to install php-xmlrpc on an image with php7.3 installed on it.
As you can see, I tried apt-get update but it does not help. I have tried using php7.3-xmlrpc also.
Dockerfile line:
RUN apt-get update && apt-get install php-xmlrpc -y
Docker build output:
Step 5/8 : RUN apt-get update && apt-get install php-xmlrpc -y
---> Running in 163542fabd8a
Get:1 http://security-cdn.debian.org/debian-security stretch/updates InRelease [94.3 kB]
Get:2 http://security-cdn.debian.org/debian-security buster/updates InRelease [39.1 kB]
Ign:3 http://cdn-fastly.deb.debian.org/debian stretch InRelease
Get:4 http://security-cdn.debian.org/debian-security stretch/updates/main amd64 Packages [500 kB]
Get:5 http://cdn-fastly.deb.debian.org/debian stretch-updates InRelease [91.0 kB]
Hit:6 http://cdn-fastly.deb.debian.org/debian buster InRelease
Get:7 http://security-cdn.debian.org/debian-security buster/updates/main amd64 Packages [112 kB]
Get:8 http://cdn-fastly.deb.debian.org/debian buster-updates InRelease [49.3 kB]
Get:9 http://cdn-fastly.deb.debian.org/debian stretch-updates/main amd64 Packages.diff/Index [12.5 kB]
Get:10 http://cdn-fastly.deb.debian.org/debian stretch-updates/main amd64 Packages 2019-10-27-2015.53.pdiff [398 B]
Get:12 http://cdn-fastly.deb.debian.org/debian stretch-updates/main amd64 Packages 2019-11-06-2017.59.pdiff [903 B]
Get:12 http://cdn-fastly.deb.debian.org/debian stretch-updates/main amd64 Packages 2019-11-06-2017.59.pdiff [903 B]
Hit:11 http://cdn-fastly.deb.debian.org/debian stretch Release
Fetched 900 kB in 1s (634 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
Package php-xmlrpc is a virtual package provided by:
php7.3-xmlrpc 7.3.11-1~deb10u1 [Not candidate version]
php7.3-xmlrpc 7.3.4-2 [Not candidate version]
php7.0-xmlrpc 7.0.33-0+deb9u6 [Not candidate version]
php7.0-xmlrpc 7.0.33-0+deb9u3 [Not candidate version]
E: Package 'php-xmlrpc' has no installation candidate
Docker file:
FROM php:7.3-apache
RUN apt-get update -y && apt-get upgrade -y;
RUN apt-get install -y libxml2-dev
RUN docker-php-ext-install -j$(nproc) xmlrpc
that works.
If you build it this way:
docker build --tag stackoverflow .
then you can check installed extension by runnig command:
docker run -it --entrypoint="" --rm stackoverflow /bin/bash
and type into console
php -m
that gives the output:
[PHP Modules]
Core
ctype
curl
date
dom
fileinfo
filter
ftp
hash
iconv
json
libxml
mbstring
mysqlnd
openssl
pcre
PDO
pdo_sqlite
Phar
posix
readline
Reflection
session
SimpleXML
sodium
SPL
sqlite3
standard
tokenizer
xml
xmlreader
xmlrpc
xmlwriter
zlib
with:
xmlrpc

Docker: E: Unable to locate package mysql-client —-no-install-recommends

I'm following this tutorial: Laravel 5.6 in Docker with PHP 7.2, NGINX 1.10 and MySQL 5.7
Which is basically an update of this: Laravel + Docker Part 1 — setup for Development
But when I ran
docker-compose up
I got this error
E: Unable to locate package mysql-client —-no-install-recommends
ERROR: Service 'app' failed to build: The command '/bin/sh -c apt-get update && apt-get install -y mysql-client —-no-install-recommends && docker-php-ext-install pdo_mysql' returned a non-zero code: 100
A full output
Creating network "pulzu_default" with the default driver
Building app
Step 1/2 : FROM php:7.2.2-fpm
---> 60245f64ed12
Step 2/2 : RUN apt-get update && apt-get install -y mysql-client —-no-install-recommends && docker-php-ext-install pdo_mysql
---> Running in cefd70564b31
Get:1 http://security.debian.org stretch/updates InRelease [94.3 kB]
Ign:2 http://cdn-fastly.deb.debian.org/debian stretch InRelease
Get:3 http://cdn-fastly.deb.debian.org/debian stretch-updates InRelease [91.0 kB]
Get:5 http://security.debian.org stretch/updates/main amd64 Packages [468 kB]
Get:4 http://cdn-fastly.deb.debian.org/debian stretch Release [118 kB]
Get:6 http://cdn-fastly.deb.debian.org/debian stretch Release.gpg [2434 B]
Get:7 http://cdn-fastly.deb.debian.org/debian stretch-updates/main amd64 Packages [12.1 kB]
Get:8 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 Packages [9530 kB]
Fetched 10.3 MB in 2s (4142 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package mysql-client —-no-install-recommends
ERROR: Service 'app' failed to build: The command '/bin/sh -c apt-get update && apt-get install -y mysql-client —-no-install-recommends && docker-php-ext-install pdo_mysql' returned a non-zero code: 100
Does anyone have any idea how to fix it?
The image is missing dependencies to be able to install mysql-client, this is caused by the --no-install-recommends flag. By default, Ubuntu installs recommended but not suggested packages. With --no-install-recommends, only the main dependencies (packages in the Depends field) are installed.
Change the Dockerfile or according to the article app.dockerfile to:
FROM php:7.2.2-fpm
RUN apt-get update && apt-get install -y mysql-client \
&& docker-php-ext-install pdo_mysql
And you should be able to build the image, therefore the docker-compose up command would work.

Laravel Homestead 'apt-get update' gives some 404

Is there some misconfiguration with Homestead 2.1.7 (box 0.4.0) preconfigured sourcelist?
PS. It would be greatly appreciated if Homestead's next versions would include options in configuration files for installing some pre-configured additional packages like MS SQL. Yes not everybody needs them, but with client projects there often comes need for more exotic packages than is found in #laragarden
vagrant#homestead:~$ sudo apt-get update
Hit http://apt.postgresql.org trusty-pgdg InRelease
Ign http://ppa.launchpad.net trusty InRelease
Ign http://us.archive.ubuntu.com trusty InRelease
Hit http://security.ubuntu.com trusty-security InRelease
Ign http://ppa.launchpad.net trusty InRelease
Hit http://apt.postgresql.org trusty-pgdg/main amd64 Packages
Hit http://ppa.launchpad.net trusty InRelease
Get:1 http://us.archive.ubuntu.com trusty-updates InRelease [64.4 kB]
Hit http://ppa.launchpad.net trusty InRelease
Hit http://security.ubuntu.com trusty-security/main Sources
Ign http://dl.hhvm.com utopic InRelease
Hit http://apt.postgresql.org trusty-pgdg/main i386 Packages
Hit http://ppa.launchpad.net trusty Release.gpg
Hit http://security.ubuntu.com trusty-security/restricted Sources
Hit http://ppa.launchpad.net trusty Release.gpg
Ign http://dl.hhvm.com utopic Release.gpg
Hit http://ppa.launchpad.net trusty/main amd64 Packages
Hit http://security.ubuntu.com trusty-security/universe Sources
Hit http://ppa.launchpad.net trusty/main i386 Packages
Hit http://ppa.launchpad.net trusty/main Translation-en
Ign http://dl.hhvm.com utopic Release
Hit http://security.ubuntu.com trusty-security/multiverse Sources
Hit http://ppa.launchpad.net trusty/main amd64 Packages
Hit http://us.archive.ubuntu.com trusty-backports InRelease
Hit http://ppa.launchpad.net trusty/main i386 Packages
Hit http://security.ubuntu.com trusty-security/main amd64 Packages
Hit http://ppa.launchpad.net trusty/main Translation-en
Ign http://dl.hhvm.com utopic/main amd64 Packages/DiffIndex
Hit http://us.archive.ubuntu.com trusty Release.gpg
Hit http://ppa.launchpad.net trusty Release
Hit http://security.ubuntu.com trusty-security/restricted amd64 Packages
Hit http://ppa.launchpad.net trusty Release
Ign http://apt.postgresql.org trusty-pgdg/main Translation-en_US
Hit http://packages.blackfire.io any InRelease
Get:2 http://us.archive.ubuntu.com trusty-updates/main Sources [248 kB]
Hit http://ppa.launchpad.net trusty/main amd64 Packages
Ign http://dl.hhvm.com utopic/main i386 Packages/DiffIndex
Hit http://security.ubuntu.com trusty-security/universe amd64 Packages
Ign http://apt.postgresql.org trusty-pgdg/main Translation-en
Hit http://security.ubuntu.com trusty-security/multiverse amd64 Packages
Hit http://security.ubuntu.com trusty-security/main i386 Packages
Hit http://ppa.launchpad.net trusty/main i386 Packages
Hit http://ppa.launchpad.net trusty/main Translation-en
Hit http://security.ubuntu.com trusty-security/restricted i386 Packages
Hit http://ppa.launchpad.net trusty/main amd64 Packages
Hit http://security.ubuntu.com trusty-security/universe i386 Packages
Hit http://ppa.launchpad.net trusty/main i386 Packages
Hit http://security.ubuntu.com trusty-security/multiverse i386 Packages
Hit http://ppa.launchpad.net trusty/main Translation-en
Hit http://security.ubuntu.com trusty-security/main Translation-en
Hit http://packages.blackfire.io any/main amd64 Packages
Hit http://security.ubuntu.com trusty-security/multiverse Translation-en
Get:3 http://us.archive.ubuntu.com trusty-updates/restricted Sources [5,359 B]
Hit http://security.ubuntu.com trusty-security/restricted Translation-en
Get:4 http://us.archive.ubuntu.com trusty-updates/universe Sources [147 kB]
Hit http://security.ubuntu.com trusty-security/universe Translation-en
Get:5 http://us.archive.ubuntu.com trusty-updates/multiverse Sources [5,161 B]
Hit http://packages.blackfire.io any/main i386 Packages
Get:6 http://us.archive.ubuntu.com trusty-updates/main amd64 Packages [689 kB]
Ign http://dl.hhvm.com utopic/main Translation-en_US
Ign http://dl.hhvm.com utopic/main Translation-en
Err http://dl.hhvm.com utopic/main amd64 Packages
404 Not Found [IP: 140.211.166.134 80]
Err http://dl.hhvm.com utopic/main i386 Packages
404 Not Found [IP: 140.211.166.134 80]
Get:7 http://us.archive.ubuntu.com trusty-updates/restricted amd64 Packages [15.9 kB]
Get:8 http://us.archive.ubuntu.com trusty-updates/universe amd64 Packages [334 kB]
Ign http://packages.blackfire.io any/main Translation-en_US
Get:9 http://us.archive.ubuntu.com trusty-updates/multiverse amd64 Packages [13.0 kB]
Get:10 http://us.archive.ubuntu.com trusty-updates/main i386 Packages [663 kB]
Ign http://packages.blackfire.io any/main Translation-en
Get:11 http://us.archive.ubuntu.com trusty-updates/restricted i386 Packages [15.6 kB]
Get:12 http://us.archive.ubuntu.com trusty-updates/universe i386 Packages [335 kB]
Get:13 http://us.archive.ubuntu.com trusty-updates/multiverse i386 Packages [13.1 kB]
Get:14 http://us.archive.ubuntu.com trusty-updates/main Translation-en [348 kB]
Get:15 http://us.archive.ubuntu.com trusty-updates/multiverse Translation-en [6,832 B]
Get:16 http://us.archive.ubuntu.com trusty-updates/restricted Translation-en [3,699 B]
Get:17 http://us.archive.ubuntu.com trusty-updates/universe Translation-en [175 kB]
Hit http://us.archive.ubuntu.com trusty-backports/main Sources
Hit http://us.archive.ubuntu.com trusty-backports/restricted Sources
Hit http://us.archive.ubuntu.com trusty-backports/universe Sources
Hit http://us.archive.ubuntu.com trusty-backports/multiverse Sources
Hit http://us.archive.ubuntu.com trusty-backports/main amd64 Packages
Hit http://us.archive.ubuntu.com trusty-backports/restricted amd64 Packages
Hit http://us.archive.ubuntu.com trusty-backports/universe amd64 Packages
Hit http://us.archive.ubuntu.com trusty-backports/multiverse amd64 Packages
Hit http://us.archive.ubuntu.com trusty-backports/main i386 Packages
Hit http://us.archive.ubuntu.com trusty-backports/restricted i386 Packages
Hit http://us.archive.ubuntu.com trusty-backports/universe i386 Packages
Hit http://us.archive.ubuntu.com trusty-backports/multiverse i386 Packages
Hit http://us.archive.ubuntu.com trusty-backports/main Translation-en
Hit http://us.archive.ubuntu.com trusty-backports/multiverse Translation-en
Hit http://us.archive.ubuntu.com trusty-backports/restricted Translation-en
Hit http://us.archive.ubuntu.com trusty-backports/universe Translation-en
Hit http://us.archive.ubuntu.com trusty Release
Hit http://us.archive.ubuntu.com trusty/main Sources
Hit http://us.archive.ubuntu.com trusty/restricted Sources
Hit http://us.archive.ubuntu.com trusty/universe Sources
Hit http://us.archive.ubuntu.com trusty/multiverse Sources
Hit http://us.archive.ubuntu.com trusty/main amd64 Packages
Hit http://us.archive.ubuntu.com trusty/restricted amd64 Packages
Hit http://us.archive.ubuntu.com trusty/universe amd64 Packages
Hit http://us.archive.ubuntu.com trusty/multiverse amd64 Packages
Hit http://us.archive.ubuntu.com trusty/main i386 Packages
Hit http://us.archive.ubuntu.com trusty/restricted i386 Packages
Hit http://us.archive.ubuntu.com trusty/universe i386 Packages
Hit http://us.archive.ubuntu.com trusty/multiverse i386 Packages
Hit http://us.archive.ubuntu.com trusty/main Translation-en
Hit http://us.archive.ubuntu.com trusty/multiverse Translation-en
Hit http://us.archive.ubuntu.com trusty/restricted Translation-en
Hit http://us.archive.ubuntu.com trusty/universe Translation-en
Ign http://us.archive.ubuntu.com trusty/main Translation-en_US
Ign http://us.archive.ubuntu.com trusty/multiverse Translation-en_US
Ign http://us.archive.ubuntu.com trusty/restricted Translation-en_US
Ign http://us.archive.ubuntu.com trusty/universe Translation-en_US
Fetched 3,083 kB in 35s (86.1 kB/s)
W: Failed to fetch http://dl.hhvm.com/ubuntu/dists/utopic/main/binary-amd64/Packages 404 Not Found [IP: 140.211.166.134 80]
W: Failed to fetch http://dl.hhvm.com/ubuntu/dists/utopic/main/binary-i386/Packages 404 Not Found [IP: 140.211.166.134 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.
If you don't need HHVM you can remove it from sources.
Connect to vagrant machine:
vagrant ssh
Remove hhvm:
sudo rm -f /etc/apt/sources.list.d/hhvm.list
Update packages list:
sudo apt-get update
Exit from machine:
exit
Restart machine:
vagrant restart --provision

How to install php7?

Since php7 has been released, I wanted to try it out on my current machine.
I have tried building it from source using this gist yet that fails for me (and I have posted the error message in the thread).
Yet the question is not necessarily solving the compiling issue, but more basic:
How can I install php7?
I am on Ubuntu14.04, yet I would like for the answer to be operating-system-agnostic.
For install php7 in ubuntu 14.04 system please follow mentioned below steps:
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php7.0
for use mysql
sudo apt-get install php7.0-mysql
sudo service apache2 restart
If you want to remove php5 then after installation of php7 follow the steps mentioned below:
sudo apt-get update
sudo apt-get purge php5-common -y
sudo apt-get install php7.0 php7.0-fpm php7.0-mysql -y
sudo apt-get --purge autoremove -y
I shared at https://jaimemontoya.com/learning-php-7/#20190807165248 the way I installed PHP Version 7.0.33-8 on Ubuntu 18.04.1. I also posted a screenshot of what my <?php phpinfo();?> returned after the successful installation. See below the steps I followed:
root#jaimemontoya:/# pwd
/
root#jaimemontoya:/# apt-add-repository ppa:ondrej/php
Co-installable PHP versions: PHP 5.6, PHP 7.x and most requested extensions are included. Only Supported Versions of PHP (http://php.net/supported-versions.php) for Supported Ubuntu Releases (https://wiki.ubuntu.com/Releases) are provided. Don't ask for end-of-life PHP versions or Ubuntu release, they won't be provided.
Debian oldstable and stable packages are provided as well: https://deb.sury.org/#debian-dpa
You can get more information about the packages at https://deb.sury.org
BUGS&FEATURES: This PPA now has a issue tracker:
https://deb.sury.org/#bug-reporting
CAVEATS:
1. If you are using php-gearman, you need to add ppa:ondrej/pkg-gearman
2. If you are using apache2, you are advised to add ppa:ondrej/apache2
3. If you are using nginx, you are advise to add ppa:ondrej/nginx-mainline
or ppa:ondrej/nginx
PLEASE READ: If you like my work and want to give me a little motivation, please consider donating regularly: https://donate.sury.org/
WARNING: add-apt-repository is broken with non-UTF-8 locales, see
https://github.com/oerdnj/deb.sury.org/issues/56 for workaround:
# LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php
More info: https://launchpad.net/~ondrej/+archive/ubuntu/php
Press [ENTER] to continue or Ctrl-c to cancel adding it.
Hit:1 http://ppa.launchpad.net/certbot/certbot/ubuntu bionic InRelease
Hit:2 http://archive.ubuntu.com/ubuntu bionic InRelease
Hit:3 http://us.archive.ubuntu.com/ubuntu bionic InRelease
Get:4 http://us.archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Get:5 http://us.archive.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Get:6 http://ppa.launchpad.net/ondrej/php/ubuntu bionic InRelease [20.8 kB]
Get:7 http://us.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [697 kB]
Get:8 http://us.archive.ubuntu.com/ubuntu bionic-updates/restricted amd64 Packages [7,024 B]
Get:9 http://us.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [983 kB]
Get:10 http://us.archive.ubuntu.com/ubuntu bionic-updates/universe Translation-en [299 kB]
Get:11 http://us.archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 Packages [11.9 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu bionic-security/universe amd64 Packages [577 kB]
Get:13 http://us.archive.ubuntu.com/ubuntu bionic-security/universe Translation-en [189 kB]
Get:14 http://ppa.launchpad.net/ondrej/php/ubuntu bionic/main amd64 Packages [45.2 kB]
Get:15 http://ppa.launchpad.net/ondrej/php/ubuntu bionic/main Translation-en [22.1 kB]
Fetched 3,029 kB in 2s (1,515 kB/s)
Reading package lists... Done
root#jaimemontoya:/# apt-get update
Hit:1 http://us.archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http://ppa.launchpad.net/certbot/certbot/ubuntu bionic InRelease
Hit:3 http://archive.ubuntu.com/ubuntu bionic InRelease
Hit:4 http://us.archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:5 http://us.archive.ubuntu.com/ubuntu bionic-security InRelease
Hit:6 http://ppa.launchpad.net/ondrej/php/ubuntu bionic InRelease
Reading package lists... Done
root#jaimemontoya:/# apt-get install php7.0 php7.0-fpm php7.0-mysql -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libpcre3 php-common php7.0-cli php7.0-common php7.0-json php7.0-opcache php7.0-readline
Suggested packages:
php-pear
The following NEW packages will be installed:
php-common php7.0 php7.0-cli php7.0-common php7.0-fpm php7.0-json php7.0-mysql php7.0-opcache php7.0-readline
The following packages will be upgraded:
libpcre3
1 upgraded, 9 newly installed, 0 to remove and 40 not upgraded.
Need to get 4,047 kB of archives.
After this operation, 14.6 MB of additional disk space will be used.
Get:1 http://ppa.launchpad.net/ondrej/php/ubuntu bionic/main amd64 libpcre3 amd64 2:8.43-1+ubuntu18.04.1+deb.sury.org+1 [237 kB]
Get:2 http://ppa.launchpad.net/ondrej/php/ubuntu bionic/main amd64 php-common all 2:69+ubuntu18.04.1+deb.sury.org+2+php7.3 [15.1 kB]
Get:3 http://ppa.launchpad.net/ondrej/php/ubuntu bionic/main amd64 php7.0-common amd64 7.0.33-8+ubuntu18.04.1+deb.sury.org+1 [897 kB]
Get:4 http://ppa.launchpad.net/ondrej/php/ubuntu bionic/main amd64 php7.0-json amd64 7.0.33-8+ubuntu18.04.1+deb.sury.org+1 [17.2 kB]
Get:5 http://ppa.launchpad.net/ondrej/php/ubuntu bionic/main amd64 php7.0-opcache amd64 7.0.33-8+ubuntu18.04.1+deb.sury.org+1 [79.1 kB]
Get:6 http://ppa.launchpad.net/ondrej/php/ubuntu bionic/main amd64 php7.0-readline amd64 7.0.33-8+ubuntu18.04.1+deb.sury.org+1 [12.6 kB]
Get:7 http://ppa.launchpad.net/ondrej/php/ubuntu bionic/main amd64 php7.0-cli amd64 7.0.33-8+ubuntu18.04.1+deb.sury.org+1 [1,300 kB]
Get:8 http://ppa.launchpad.net/ondrej/php/ubuntu bionic/main amd64 php7.0-fpm amd64 7.0.33-8+ubuntu18.04.1+deb.sury.org+1 [1,307 kB]
Get:9 http://ppa.launchpad.net/ondrej/php/ubuntu bionic/main amd64 php7.0 all 7.0.33-8+ubuntu18.04.1+deb.sury.org+1 [56.3 kB]
Get:10 http://ppa.launchpad.net/ondrej/php/ubuntu bionic/main amd64 php7.0-mysql amd64 7.0.33-8+ubuntu18.04.1+deb.sury.org+1 [125 kB]
Fetched 4,047 kB in 4s (916 kB/s)
(Reading database ... 169946 files and directories currently installed.)
Preparing to unpack .../libpcre3_2%3a8.43-1+ubuntu18.04.1+deb.sury.org+1_amd64.deb ...
Unpacking libpcre3:amd64 (2:8.43-1+ubuntu18.04.1+deb.sury.org+1) over (2:8.39-9) ...
Setting up libpcre3:amd64 (2:8.43-1+ubuntu18.04.1+deb.sury.org+1) ...
Selecting previously unselected package php-common.
(Reading database ... 169946 files and directories currently installed.)
Preparing to unpack .../0-php-common_2%3a69+ubuntu18.04.1+deb.sury.org+2+php7.3_all.deb ...
Unpacking php-common (2:69+ubuntu18.04.1+deb.sury.org+2+php7.3) ...
Selecting previously unselected package php7.0-common.
Preparing to unpack .../1-php7.0-common_7.0.33-8+ubuntu18.04.1+deb.sury.org+1_amd64.deb ...
Unpacking php7.0-common (7.0.33-8+ubuntu18.04.1+deb.sury.org+1) ...
Selecting previously unselected package php7.0-json.
Preparing to unpack .../2-php7.0-json_7.0.33-8+ubuntu18.04.1+deb.sury.org+1_amd64.deb ...
Unpacking php7.0-json (7.0.33-8+ubuntu18.04.1+deb.sury.org+1) ...
Selecting previously unselected package php7.0-opcache.
Preparing to unpack .../3-php7.0-opcache_7.0.33-8+ubuntu18.04.1+deb.sury.org+1_amd64.deb ...
Unpacking php7.0-opcache (7.0.33-8+ubuntu18.04.1+deb.sury.org+1) ...
Selecting previously unselected package php7.0-readline.
Preparing to unpack .../4-php7.0-readline_7.0.33-8+ubuntu18.04.1+deb.sury.org+1_amd64.deb ...
Unpacking php7.0-readline (7.0.33-8+ubuntu18.04.1+deb.sury.org+1) ...
Selecting previously unselected package php7.0-cli.
Preparing to unpack .../5-php7.0-cli_7.0.33-8+ubuntu18.04.1+deb.sury.org+1_amd64.deb ...
Unpacking php7.0-cli (7.0.33-8+ubuntu18.04.1+deb.sury.org+1) ...
Selecting previously unselected package php7.0-fpm.
Preparing to unpack .../6-php7.0-fpm_7.0.33-8+ubuntu18.04.1+deb.sury.org+1_amd64.deb ...
Unpacking php7.0-fpm (7.0.33-8+ubuntu18.04.1+deb.sury.org+1) ...
Selecting previously unselected package php7.0.
Preparing to unpack .../7-php7.0_7.0.33-8+ubuntu18.04.1+deb.sury.org+1_all.deb ...
Unpacking php7.0 (7.0.33-8+ubuntu18.04.1+deb.sury.org+1) ...
Selecting previously unselected package php7.0-mysql.
Preparing to unpack .../8-php7.0-mysql_7.0.33-8+ubuntu18.04.1+deb.sury.org+1_amd64.deb ...
Unpacking php7.0-mysql (7.0.33-8+ubuntu18.04.1+deb.sury.org+1) ...
Processing triggers for ureadahead (0.100.0-21) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Setting up php-common (2:69+ubuntu18.04.1+deb.sury.org+2+php7.3) ...
Created symlink /etc/systemd/system/timers.target.wants/phpsessionclean.timer → /lib/systemd/system/phpsessionclean.timer.
Processing triggers for systemd (237-3ubuntu10.22) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Setting up php7.0-common (7.0.33-8+ubuntu18.04.1+deb.sury.org+1) ...
Creating config file /etc/php/7.0/mods-available/calendar.ini with new version
Creating config file /etc/php/7.0/mods-available/ctype.ini with new version
Creating config file /etc/php/7.0/mods-available/exif.ini with new version
Creating config file /etc/php/7.0/mods-available/fileinfo.ini with new version
Creating config file /etc/php/7.0/mods-available/ftp.ini with new version
Creating config file /etc/php/7.0/mods-available/gettext.ini with new version
Creating config file /etc/php/7.0/mods-available/iconv.ini with new version
Creating config file /etc/php/7.0/mods-available/pdo.ini with new version
Creating config file /etc/php/7.0/mods-available/phar.ini with new version
Creating config file /etc/php/7.0/mods-available/posix.ini with new version
Creating config file /etc/php/7.0/mods-available/shmop.ini with new version
Creating config file /etc/php/7.0/mods-available/sockets.ini with new version
Creating config file /etc/php/7.0/mods-available/sysvmsg.ini with new version
Creating config file /etc/php/7.0/mods-available/sysvsem.ini with new version
Creating config file /etc/php/7.0/mods-available/sysvshm.ini with new version
Creating config file /etc/php/7.0/mods-available/tokenizer.ini with new version
Setting up php7.0-mysql (7.0.33-8+ubuntu18.04.1+deb.sury.org+1) ...
Creating config file /etc/php/7.0/mods-available/mysqlnd.ini with new version
Creating config file /etc/php/7.0/mods-available/mysqli.ini with new version
Creating config file /etc/php/7.0/mods-available/pdo_mysql.ini with new version
Setting up php7.0-readline (7.0.33-8+ubuntu18.04.1+deb.sury.org+1) ...
Creating config file /etc/php/7.0/mods-available/readline.ini with new version
Setting up php7.0-opcache (7.0.33-8+ubuntu18.04.1+deb.sury.org+1) ...
Creating config file /etc/php/7.0/mods-available/opcache.ini with new version
Setting up php7.0-json (7.0.33-8+ubuntu18.04.1+deb.sury.org+1) ...
Creating config file /etc/php/7.0/mods-available/json.ini with new version
Setting up php7.0-cli (7.0.33-8+ubuntu18.04.1+deb.sury.org+1) ...
update-alternatives: using /usr/bin/php7.0 to provide /usr/bin/php (php) in auto mode
update-alternatives: using /usr/bin/phar7.0 to provide /usr/bin/phar (phar) in auto mode
update-alternatives: using /usr/bin/phar.phar7.0 to provide /usr/bin/phar.phar (phar.phar) in auto mode
Creating config file /etc/php/7.0/cli/php.ini with new version
Setting up php7.0-fpm (7.0.33-8+ubuntu18.04.1+deb.sury.org+1) ...
Creating config file /etc/php/7.0/fpm/php.ini with new version
NOTICE: Not enabling PHP 7.0 FPM by default.
NOTICE: To enable PHP 7.0 FPM in Apache2 do:
NOTICE: a2enmod proxy_fcgi setenvif
NOTICE: a2enconf php7.0-fpm
NOTICE: You are seeing this message because you have apache2 package installed.
Created symlink /etc/systemd/system/multi-user.target.wants/php7.0-fpm.service → /lib/systemd/system/php7.0-fpm.service.
Setting up php7.0 (7.0.33-8+ubuntu18.04.1+deb.sury.org+1) ...
Processing triggers for ureadahead (0.100.0-21) ...
Processing triggers for systemd (237-3ubuntu10.22) ...
root#jaimemontoya:/# apt-get --purge autoremove -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 40 not upgraded.
root#jaimemontoya:/# service php7.0-fpm start
root#jaimemontoya:/# php -v
PHP 7.0.33-8+ubuntu18.04.1+deb.sury.org+1 (cli) (built: May 31 2019 11:34:35) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
with Zend OPcache v7.0.33-8+ubuntu18.04.1+deb.sury.org+1, Copyright (c) 1999-2017, by Zend Technologies
root#jaimemontoya:/# apt purge libapache2-mod-php7.0 libapache2-mod-php
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'libapache2-mod-php' is not installed, so not removed
Package 'libapache2-mod-php7.0' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 40 not upgraded.
root#jaimemontoya:/# apt install libapache2-mod-php7.0 libapache2-mod-php
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libapache2-mod-php7.3 libpcre2-8-0 libsodium23 php7.3-cli php7.3-common php7.3-json php7.3-opcache php7.3-readline
Suggested packages:
php-pear
The following NEW packages will be installed:
libapache2-mod-php libapache2-mod-php7.0 libapache2-mod-php7.3 libpcre2-8-0 libsodium23 php7.3-cli php7.3-common php7.3-json php7.3-opcache php7.3-readline
0 upgraded, 10 newly installed, 0 to remove and 40 not upgraded.
Need to get 5,439 kB of archives.
After this operation, 22.3 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://ppa.launchpad.net/ondrej/php/ubuntu bionic/main amd64 php7.3-common amd64 7.3.7-2+ubuntu18.04.1+deb.sury.org+1 [938 kB]
Get:2 http://ppa.launchpad.net/ondrej/php/ubuntu bionic/main amd64 php7.3-json amd64 7.3.7-2+ubuntu18.04.1+deb.sury.org+1 [18.4 kB]
Get:3 http://ppa.launchpad.net/ondrej/php/ubuntu bionic/main amd64 php7.3-opcache amd64 7.3.7-2+ubuntu18.04.1+deb.sury.org+1 [182 kB]
Get:4 http://ppa.launchpad.net/ondrej/php/ubuntu bionic/main amd64 php7.3-readline amd64 7.3.7-2+ubuntu18.04.1+deb.sury.org+1 [12.0 kB]
Get:5 http://ppa.launchpad.net/ondrej/php/ubuntu bionic/main amd64 libpcre2-8-0 amd64 10.33-1+ubuntu18.04.1+deb.sury.org+1 [191 kB]
Get:6 http://ppa.launchpad.net/ondrej/php/ubuntu bionic/main amd64 libsodium23 amd64 1.0.17-0.1+ubuntu18.04.1+deb.sury.org+1 [147 kB]
Get:7 http://ppa.launchpad.net/ondrej/php/ubuntu bionic/main amd64 php7.3-cli amd64 7.3.7-2+ubuntu18.04.1+deb.sury.org+1 [1,378 kB]
Get:8 http://ppa.launchpad.net/ondrej/php/ubuntu bionic/main amd64 libapache2-mod-php7.3 amd64 7.3.7-2+ubuntu18.04.1+deb.sury.org+1 [1,324 kB]
Get:9 http://ppa.launchpad.net/ondrej/php/ubuntu bionic/main amd64 libapache2-mod-php all 2:7.3+69+ubuntu18.04.1+deb.sury.org+2+php7.3 [6,244 B]
Get:10 http://ppa.launchpad.net/ondrej/php/ubuntu bionic/main amd64 libapache2-mod-php7.0 amd64 7.0.33-8+ubuntu18.04.1+deb.sury.org+1 [1,242 kB]
Fetched 5,439 kB in 5s (1,094 kB/s)
Selecting previously unselected package php7.3-common.
(Reading database ... 170110 files and directories currently installed.)
Preparing to unpack .../0-php7.3-common_7.3.7-2+ubuntu18.04.1+deb.sury.org+1_amd64.deb ...
Unpacking php7.3-common (7.3.7-2+ubuntu18.04.1+deb.sury.org+1) ...
Selecting previously unselected package php7.3-json.
Preparing to unpack .../1-php7.3-json_7.3.7-2+ubuntu18.04.1+deb.sury.org+1_amd64.deb ...
Unpacking php7.3-json (7.3.7-2+ubuntu18.04.1+deb.sury.org+1) ...
Selecting previously unselected package php7.3-opcache.
Preparing to unpack .../2-php7.3-opcache_7.3.7-2+ubuntu18.04.1+deb.sury.org+1_amd64.deb ...
Unpacking php7.3-opcache (7.3.7-2+ubuntu18.04.1+deb.sury.org+1) ...
Selecting previously unselected package php7.3-readline.
Preparing to unpack .../3-php7.3-readline_7.3.7-2+ubuntu18.04.1+deb.sury.org+1_amd64.deb ...
Unpacking php7.3-readline (7.3.7-2+ubuntu18.04.1+deb.sury.org+1) ...
Selecting previously unselected package libpcre2-8-0:amd64.
Preparing to unpack .../4-libpcre2-8-0_10.33-1+ubuntu18.04.1+deb.sury.org+1_amd64.deb ...
Unpacking libpcre2-8-0:amd64 (10.33-1+ubuntu18.04.1+deb.sury.org+1) ...
Selecting previously unselected package libsodium23:amd64.
Preparing to unpack .../5-libsodium23_1.0.17-0.1+ubuntu18.04.1+deb.sury.org+1_amd64.deb ...
Unpacking libsodium23:amd64 (1.0.17-0.1+ubuntu18.04.1+deb.sury.org+1) ...
Selecting previously unselected package php7.3-cli.
Preparing to unpack .../6-php7.3-cli_7.3.7-2+ubuntu18.04.1+deb.sury.org+1_amd64.deb ...
Unpacking php7.3-cli (7.3.7-2+ubuntu18.04.1+deb.sury.org+1) ...
Selecting previously unselected package libapache2-mod-php7.3.
Preparing to unpack .../7-libapache2-mod-php7.3_7.3.7-2+ubuntu18.04.1+deb.sury.org+1_amd64.deb ...
Unpacking libapache2-mod-php7.3 (7.3.7-2+ubuntu18.04.1+deb.sury.org+1) ...
Selecting previously unselected package libapache2-mod-php.
Preparing to unpack .../8-libapache2-mod-php_2%3a7.3+69+ubuntu18.04.1+deb.sury.org+2+php7.3_all.deb ...
Unpacking libapache2-mod-php (2:7.3+69+ubuntu18.04.1+deb.sury.org+2+php7.3) ...
Selecting previously unselected package libapache2-mod-php7.0.
Preparing to unpack .../9-libapache2-mod-php7.0_7.0.33-8+ubuntu18.04.1+deb.sury.org+1_amd64.deb ...
Unpacking libapache2-mod-php7.0 (7.0.33-8+ubuntu18.04.1+deb.sury.org+1) ...
Setting up php7.3-common (7.3.7-2+ubuntu18.04.1+deb.sury.org+1) ...
Creating config file /etc/php/7.3/mods-available/calendar.ini with new version
Creating config file /etc/php/7.3/mods-available/ctype.ini with new version
Creating config file /etc/php/7.3/mods-available/exif.ini with new version
Creating config file /etc/php/7.3/mods-available/fileinfo.ini with new version
Creating config file /etc/php/7.3/mods-available/ftp.ini with new version
Creating config file /etc/php/7.3/mods-available/gettext.ini with new version
Creating config file /etc/php/7.3/mods-available/iconv.ini with new version
Creating config file /etc/php/7.3/mods-available/pdo.ini with new version
Creating config file /etc/php/7.3/mods-available/phar.ini with new version
Creating config file /etc/php/7.3/mods-available/posix.ini with new version
Creating config file /etc/php/7.3/mods-available/shmop.ini with new version
Creating config file /etc/php/7.3/mods-available/sockets.ini with new version
Creating config file /etc/php/7.3/mods-available/sysvmsg.ini with new version
Creating config file /etc/php/7.3/mods-available/sysvsem.ini with new version
Creating config file /etc/php/7.3/mods-available/sysvshm.ini with new version
Creating config file /etc/php/7.3/mods-available/tokenizer.ini with new version
Setting up libapache2-mod-php7.0 (7.0.33-8+ubuntu18.04.1+deb.sury.org+1) ...
Creating config file /etc/php/7.0/apache2/php.ini with new version
Module mpm_event disabled.
Enabling module mpm_prefork.
apache2_switch_mpm Switch to prefork
apache2_invoke: Enable module php7.0
Setting up php7.3-opcache (7.3.7-2+ubuntu18.04.1+deb.sury.org+1) ...
Creating config file /etc/php/7.3/mods-available/opcache.ini with new version
Setting up libsodium23:amd64 (1.0.17-0.1+ubuntu18.04.1+deb.sury.org+1) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Setting up php7.3-readline (7.3.7-2+ubuntu18.04.1+deb.sury.org+1) ...
Creating config file /etc/php/7.3/mods-available/readline.ini with new version
Setting up libpcre2-8-0:amd64 (10.33-1+ubuntu18.04.1+deb.sury.org+1) ...
Setting up php7.3-json (7.3.7-2+ubuntu18.04.1+deb.sury.org+1) ...
Creating config file /etc/php/7.3/mods-available/json.ini with new version
Setting up php7.3-cli (7.3.7-2+ubuntu18.04.1+deb.sury.org+1) ...
update-alternatives: using /usr/bin/php7.3 to provide /usr/bin/php (php) in auto mode
update-alternatives: using /usr/bin/phar7.3 to provide /usr/bin/phar (phar) in auto mode
update-alternatives: using /usr/bin/phar.phar7.3 to provide /usr/bin/phar.phar (phar.phar) in auto mode
Creating config file /etc/php/7.3/cli/php.ini with new version
Setting up libapache2-mod-php7.3 (7.3.7-2+ubuntu18.04.1+deb.sury.org+1) ...
Creating config file /etc/php/7.3/apache2/php.ini with new version
libapache2-mod-php7.3: php7.0 module already enabled, not enabling PHP 7.3
Setting up libapache2-mod-php (2:7.3+69+ubuntu18.04.1+deb.sury.org+2+php7.3) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
root#jaimemontoya:/#
UPDATE 1:
As you requested it k0pernikus, literally how it was published in Chapter 1 of Learning PHP 7, by Antonio Lopez, published by Packt Publishing:
Installing PHP
The only thing to consider in this section is to remove any previous
PHP versions on your system. To do so, you can run the following
command:
$ sudo apt-get -y purge php.*
The next step is to add the necessary repositories in order to fetch
the correct PHP version. The commands to add and update them are:
$ sudo apt-get install python-software-properties
$ sudo LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/php -y
$ sudo apt-get update
Finally, we need to install PHP 7 together with the driver for MySQL.
For this, just execute the following three commands:
$ sudo apt-get install php7.0 php7.0-fpm php7.0-mysql -y
$ sudo apt-get --purge autoremove -y
$ sudo apt-get --purge autoremove -y
$ sudo service php7.0-fpm start

Categories