Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DietPi-Software | Custom PHP version support #2600

Open
akshay7394 opened this issue Feb 28, 2019 · 3 comments
Open

DietPi-Software | Custom PHP version support #2600

akshay7394 opened this issue Feb 28, 2019 · 3 comments

Comments

@akshay7394
Copy link

akshay7394 commented Feb 28, 2019

Creating a bug report/issue

Required Information

  • Date | Thu 28 Feb 14:57:38 IST 2019
  • Bug report | N/A
  • DietPi version | v6.21.1 (Fourdee/master)
  • Img creator | DietPi Core Team
  • Pre-image | Raspbian Lite
  • SBC device | RPi Zero W (armv6l) (index=1)
  • Kernel version | #1200 Tue Feb 12 20:11:02 GMT 2019
  • Distro | stretch (index=4)
  • Command | G_AGI: libapache2-mod-php7.0 php7.0-curl php7.0-gd php-apcu php7.0-mbstring php7.0-opcache php7.0-zip php7.0-xml php7.0-mcrypt php7.0-mysql
  • Exit code | 100
  • Software title | DietPi-Software

Additional Information (if applicable)

  • Software title | (EG: Nextcloud)
  • Was the software title installed freshly or updated/migrated?
  • Can this issue be replicated on a fresh installation of DietPi? - Not tested on a fresh install of the most-recent version. It worked as desired in 6.19
  • dietpi-bugreport ID | sed -n 5p /DietPi/dietpi/.hw_model

Steps to reproduce

  1. Manually upgrade to PHP 7.2
  2. Try to install LAMP stack or software that requires stack (like PiHole)

Expected behaviour

  • Desired software (MariaDB stack with apache2) should get installed

Actual behaviour

  • The installation fails incessantly. Installation fails even if the installation is attempted after purging all instances of apache and php

Extra details

  • Even after attempting to purge any and all packages relating to web server and php, this error still blocks installation. The actual failure happens when the system is trying to install PHP.

The error that is thrown is :

[  OK  ] DietPi-Software | APT installation for: libapache2-mod-php7.0 php7.0-curl php7.0-gd php-apcu php7.0-mbstring ph
p7.0-opcache php7.0-zip php7.0-xml php7.0-mcrypt php7.0-mysql, please wait...
E: Unable to correct problems, you have held broken packages.

[FAILED] DietPi-Software | G_AGI: libapache2-mod-php7.0 php7.0-curl php7.0-gd php-apcu php7.0-mbstring php7.0-opcache ph
p7.0-zip php7.0-xml php7.0-mcrypt php7.0-mysql
@MichaIng MichaIng added Known Issue 🐛 Outside of DietPi scripts eg: user installed/configured software labels Feb 28, 2019
@MichaIng
Copy link
Owner

MichaIng commented Feb 28, 2019

@akshay7394
Many thanks for your report.

This is known and expected. DietPi-Software expect and installs PHP from the official APT repo, which is currently PHP7.0. If you manually install a more current PHP version from custom sources, you run into these issues.

But let me try to get this fixed for you, as we anyway plan to install PHP7.2 (or even 7.3) on Stretch as well, as some software titles are going to drop support for lower versions: #2367

With Apache, nothing else should be required. Please report back if this works fine.


I turned this into a feature request. I anyway had the idea to make DietPi-Software more flexible and check for installed PHP versions and use found one(s) automatically.

@MichaIng MichaIng changed the title Unable to complete installation of anything that requires PHP DietPi-Software | Custom PHP version support Feb 28, 2019
@akshay7394
Copy link
Author

@MichaIng Hi! No I didn't follow those instructions to set it up-- however, I will now.

Quick question though, if I Purged both apache2 and php7.2-related packages, why is the install still failing through dietpi-software? Aren't there no longer any packages for it to have problems with?

@MichaIng
Copy link
Owner

MichaIng commented Apr 24, 2019

@akshay7394
Sorry for the forgotten reply.

Not sure why APT still fails. Most likely there is still some package installed that breaks earlier PHP and/or other software versions from official repo, perhaps some library. E.g. I found that when installing certain packages from Ondrejs PHP repo, the libssl1.1 version he ships breaks Lighttpd on Stretch (and Jessie) systems. It is quite a hassle to downgrade those packages since they are dependencies for a whole bunch or other core packages. This happened to me when playing around with PHP7.3 on Stretch: #2734

  • So to check in your case we need to get an overview which PHP package is installed from which repo: dpkg -l | grep '.*php.*'

But in ~1 week we release DietPi v6.23 and migrate all systems to PHP7.3 (besides when ownCloud is installed, then PHP7.2): #2367 (comment)

From then on, Ondrejs repo will be the default and we will keep PHP versions up-to-date as fast as offered software titles support it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants