Describe the bug
When executing apt-get upgrade --no-install-recommends -y --force-yes in my build, it appears to fail trying to upgrade the php7 packages...
Virtual environments affected
Expected behavior
apt-get upgrade --no-install-recommends -y --force-yes should succeed to upgrade existing packages.
Actual behavior
apt-get upgrade ... fails with the follow messages:
Unsafe symlinks encountered in /run/php, refusing.
Job for php7.3-fpm.service failed because the control process exited with error code.
See "systemctl status php7.3-fpm.service" and "journalctl -xe" for details.
invoke-rc.d: initscript php7.3-fpm, action "restart" failed.
● php7.3-fpm.service - The PHP 7.3 FastCGI Process Manager
Loaded: loaded (/lib/systemd/system/php7.3-fpm.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Fri 2019-10-11 06:12:09 UTC; 7ms ago
Docs: man:php-fpm7.3(8)
Process: 13234 ExecStart=/usr/sbin/php-fpm7.3 --nodaemonize --fpm-config /etc/php/7.3/fpm/php-fpm.conf (code=exited, status=78)
Main PID: 13234 (code=exited, status=78)
I have encountered a similar issue when trying to install the php7.3-intl package:
workflow
name: Main workflow
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Install PHP extensions
run: sudo apt-get install php7.3-intl
- name: Checkout
uses: actions/checkout@v1
error output is the same:
```
Processing triggers for php7.3-fpm (7.3.9-1+ubuntu18.04.1+deb.sury.org+1) ...
Job for php7.3-fpm.service failed because the control process exited with error code.
See "systemctl status php7.3-fpm.service" and "journalctl -xe" for details.
invoke-rc.d: initscript php7.3-fpm, action "restart" failed.
● php7.3-fpm.service - The PHP 7.3 FastCGI Process Manager
Loaded: loaded (/lib/systemd/system/php7.3-fpm.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2019-10-24 10:05:09 UTC; 7ms ago
Docs: man:php-fpm7.3(8)
Process: 3102 ExecStart=/usr/sbin/php-fpm7.3 --nodaemonize --fpm-config /etc/php/7.3/fpm/php-fpm.conf (code=exited, status=78)
Main PID: 3102 (code=exited, status=78)
Oct 24 10:05:08 fv-az88 systemd[1]: Starting The PHP 7.3 FastCGI Process Manager...
Oct 24 10:05:09 fv-az88 php-fpm7.3[3102]: [24-Oct-2019 10:05:09] ERROR: unable to bind listening socket for address '/run/php/php7.3-fpm.sock': No such file or directory (2)
Oct 24 10:05:09 fv-az88 php-fpm7.3[3102]: [24-Oct-2019 10:05:09] ERROR: FPM initialization failed
Oct 24 10:05:09 fv-az88 systemd[1]: php7.3-fpm.service: Main process exited, code=exited, status=78/n/a
Oct 24 10:05:09 fv-az88 systemd[1]: php7.3-fpm.service: Failed with result 'exit-code'.
Oct 24 10:05:09 fv-az88 systemd[1]: Failed to start The PHP 7.3 FastCGI Process Manager.
dpkg: error processing package php7.3-fpm (--configure):
installed php7.3-fpm package post-installation script subprocess returned error exit status 1
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Errors were encountered while processing:
php7.3-fpm
E: Sub-process /usr/bin/dpkg returned an error code (1)
````
@lordrhodos You can get around this by first uninstalling php7.3-fpm and then installing php7.3-intl for now.
@ADmad I have used the unbuntu-16.04 to bypass this issue for now, but will give your suggestion a try 👍
Good to know the issue doesn't occur on unbuntu-16.04. Fortunately I figured out quite quickly how to the avoid the problem on unbuntu-18.04 so stuck with that :slightly_smiling_face:.
your proposed solution is working for me as well, and I will stick with it for now, thx @ADmad !
Hey @ADmad , would you mind sharing the part of your script where u uninstall fpm and install intl.
Right now I'm running:
- name: Install ext-intl
run: |
sudo apt-get autoremove --purge php-fpm
sudo apt-get clean
sudo apt-get autoclean
sudo apt-get autoremove
sudo apt-get install php-intl
But this doesn't seem to work:
Run # sudo apt-get update
Reading package lists...
Building dependency tree...
Reading state information...
Package 'php-fpm' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 22 not upgraded.
Reading package lists...
Building dependency tree...
Reading state information...
Reading package lists...
Building dependency tree...
Reading state information...
0 upgraded, 0 newly installed, 0 to remove and 22 not upgraded.
Reading package lists...
Building dependency tree...
Reading state information...
The following NEW packages will be installed:
php-intl
0 upgraded, 1 newly installed, 0 to remove and 22 not upgraded.
Need to get 6,010 B of archives.
After this operation, 12.3 kB of additional disk space will be used.
Err:1 http://ppa.launchpad.net/ondrej/php/ubuntu xenial/main amd64 php-intl all 2:7.3+69+ubuntu16.04.1+deb.sury.org+2+php7.3
404 Not Found [IP: 91.189.95.83 80]
E: Failed to fetch http://ppa.launchpad.net/ondrej/php/ubuntu/pool/main/p/php-defaults/php-intl_7.3+69+ubuntu16.04.1+deb.sury.org+2+php7.3_all.deb 404 Not Found [IP: 91.189.95.83 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
##[error]Process completed with exit code 100.
@aFluxx Here you go https://github.com/cakephp/cakephp/blob/4.x/.github/workflows/ci.yml
Thank you very much!
Similar behavior when installing gcc-8 on Ubuntu 18.04 and Ubuntu 16.04
Workflow:
jobs:
build:
runs-on: ubuntu-18.04
steps:
- name: Install required tools / compiler
run: sudo apt install gcc-8
Logs:
2019-11-19T19:03:32.1637028Z ##[section]Starting: Request a runner to run this job
2019-11-19T19:03:32.2187065Z Requesting a hosted runner in current repository's account/organization with labels: 'ubuntu-18.04', require runner match: True
2019-11-19T19:03:32.3487189Z Labels matched hosted runners has been found, waiting for one of them get assigned for this job.
2019-11-19T19:03:32.3737296Z ##[section]Finishing: Request a runner to run this job
2019-11-19T19:03:39.4148391Z Current runner version: '2.160.2'
2019-11-19T19:03:39.4149570Z Prepare workflow directory
2019-11-19T19:03:39.4370128Z Prepare all required actions
2019-11-19T19:03:39.4397473Z Download action repository 'actions/checkout@v1'
2019-11-19T19:03:41.7685716Z ##[group]Run sudo apt install gcc-8
2019-11-19T19:03:41.7686125Z [36;1msudo apt install gcc-8[0m
2019-11-19T19:03:41.7718300Z shell: /bin/bash -e {0}
2019-11-19T19:03:41.7718586Z ##[endgroup]
2019-11-19T19:03:42.6659882Z
2019-11-19T19:03:42.6671952Z WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
2019-11-19T19:03:42.6672151Z
2019-11-19T19:03:48.6587836Z Reading package lists...
2019-11-19T19:03:49.4070457Z Building dependency tree...
2019-11-19T19:03:49.4171005Z Reading state information...
2019-11-19T19:03:49.5657075Z The following packages were automatically installed and are no longer required:
2019-11-19T19:03:49.5670556Z bc dns-root-data dnsmasq-base ebtables landscape-common liblxc-common
2019-11-19T19:03:49.5673431Z liblxc1 libuv1 lxcfs lxd lxd-client python3-attr python3-automat
2019-11-19T19:03:49.5690760Z python3-click python3-colorama python3-constantly python3-hyperlink
2019-11-19T19:03:49.5692915Z python3-incremental python3-pam python3-pyasn1 python3-pyasn1-modules
2019-11-19T19:03:49.5693943Z python3-service-identity python3-twisted python3-twisted-bin
2019-11-19T19:03:49.5694979Z python3-zope.interface uidmap xdelta3
2019-11-19T19:03:49.5696168Z Use 'sudo apt autoremove' to remove them.
2019-11-19T19:03:49.5696670Z The following additional packages will be installed:
2019-11-19T19:03:49.5698610Z cpp-8 gcc-9-base libasan5 libgcc-8-dev libubsan1
2019-11-19T19:03:49.5699388Z Suggested packages:
2019-11-19T19:03:49.5700179Z gcc-8-locales gcc-8-multilib gcc-8-doc libgcc1-dbg libgomp1-dbg libitm1-dbg
2019-11-19T19:03:49.5700927Z libatomic1-dbg libasan5-dbg liblsan0-dbg libtsan0-dbg libubsan1-dbg
2019-11-19T19:03:49.5702168Z libmpx2-dbg libquadmath0-dbg
2019-11-19T19:03:49.6610320Z The following NEW packages will be installed:
2019-11-19T19:03:49.6620370Z cpp-8 gcc-8 gcc-9-base libasan5 libgcc-8-dev libubsan1
2019-11-19T19:03:49.6890712Z 0 upgraded, 6 newly installed, 0 to remove and 19 not upgraded.
2019-11-19T19:03:49.6898790Z Need to get 21.6 MB of archives.
2019-11-19T19:03:49.6899717Z After this operation, 71.8 MB of additional disk space will be used.
2019-11-19T19:03:49.6901637Z Get:1 http://azure.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 cpp-8 amd64 8.3.0-6ubuntu1~18.04.1 [8914 kB]
2019-11-19T19:03:49.8452103Z Err:2 http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu bionic/main amd64 gcc-9-base amd64 9.2.1-9ubuntu2~18.04.1
2019-11-19T19:03:49.8453196Z 404 Not Found [IP: 91.189.95.83 80]
2019-11-19T19:03:49.8632452Z Get:3 http://azure.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libgcc-8-dev amd64 8.3.0-6ubuntu1~18.04.1 [2307 kB]
2019-11-19T19:03:49.9075982Z Get:4 http://azure.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 gcc-8 amd64 8.3.0-6ubuntu1~18.04.1 [9787 kB]
2019-11-19T19:03:50.0114763Z Err:5 http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu bionic/main amd64 libasan5 amd64 9.2.1-9ubuntu2~18.04.1
2019-11-19T19:03:50.0115089Z 404 Not Found [IP: 91.189.95.83 80]
2019-11-19T19:03:50.1690838Z Err:6 http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu bionic/main amd64 libubsan1 amd64 9.2.1-9ubuntu2~18.04.1
2019-11-19T19:03:50.1691099Z 404 Not Found [IP: 91.189.95.83 80]
2019-11-19T19:03:50.1922296Z Fetched 21.0 MB in 0s (42.9 MB/s)
2019-11-19T19:03:50.1932032Z E: Failed to fetch http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu/pool/main/g/gcc-9/gcc-9-base_9.2.1-9ubuntu2~18.04.1_amd64.deb 404 Not Found [IP: 91.189.95.83 80]
2019-11-19T19:03:50.1933187Z E: Failed to fetch http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu/pool/main/g/gcc-9/libasan5_9.2.1-9ubuntu2~18.04.1_amd64.deb 404 Not Found [IP: 91.189.95.83 80]
2019-11-19T19:03:50.1934335Z E: Failed to fetch http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu/pool/main/g/gcc-9/libubsan1_9.2.1-9ubuntu2~18.04.1_amd64.deb 404 Not Found [IP: 91.189.95.83 80]
2019-11-19T19:03:50.1935677Z E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
2019-11-19T19:03:50.1995882Z ##[error]Process completed with exit code 100.
2019-11-19T19:03:50.2049089Z Cleaning up orphan processes
@pefoo I think yours is a slightly different issue. I believe in your case, the (old) version of that package does not exist anymore for download:
2019-11-19T19:03:49.6901637Z Get:1 http://azure.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 cpp-8 amd64 8.3.0-6ubuntu1~18.04.1 [8914 kB]
2019-11-19T19:03:49.8452103Z Err:2 http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu bionic/main amd64 gcc-9-base amd64 9.2.1-9ubuntu2~18.04.1
2019-11-19T19:03:49.8453196Z 404 Not Found [IP: 91.189.95.83 80]
In this case an sudo apt-get update should suffice.
The other issues reporting focus on PHP-FPM having troubles correctly updating a package, but the download worked.
@mfn Thank you for clarification. Adding sudo apt-get update solved the problem.
The faulty ppa is actually not even required in the case of Ubuntu 18.04 (but added for some reason in order to install gcc-7).
This issue has not had any activity for 45 days and will be closed in 45 days if there continues to be no activity.
@diclophis I can't reproduce it. This works fine for me:
sudo apt-get update
sudo apt-get upgrade --no-install-recommends -y --force-yes
Closing the issue, but feel free to reopen if you have any concerns.
Thank you!
Most helpful comment
@lordrhodos You can get around this by first uninstalling
php7.3-fpmand then installingphp7.3-intlfor now.