1
  • I want to install Nextcloud on my Raspberry Pi 3 B+ running Arch Linux.
  • Nextcloud requires a version of PHP: 7.1 <= x < 7.4.0.
  • I have done a lot of research, and there seems to be no place on the entire internet which offers a PHP version of 7.1, 7.2 nor the version 7.3.

Not that I would want to use 7.1 anyways, since it's no longer supported.

But apparently, the people behind the Arch ARM repositories have decided, that it would be a good idea to NOT offer older versions of packages (at least for the ARM architecture).

This leads to my browser only showing me the error page of the Nextcloud version-check:

This version of Nextcloud is not compatible with > PHP 7.3. You are currently running 7.4.1.


As it turns out, the 18 lines of PHP code in this file prohibit unsupported versions of PHP from running Nextcloud: /usr/share/webapps/nextcloud/lib/versioncheck.php

However, circumventing the version check as was proposed as a "quick fix" here has turned out to be pointless. However, I got a nice background behind a new error, for the duration I kept the changes in the version check.

Summary

This leads me to ask my question:

What is the best (or recommended) approach for installing a compatible version of PHP on my Raspberry Pi?

I think I might have to compile an older version from source myself.
I consider this to be a good option, assuming I can build for ARM on my 64bit CPU of my PC, as the compilation time on the Raspberry Pi would likely take very long.

And after I compiled the code: How would I make an installable package and install it?

Thanks in advance.


Please be advised, that there are other (not directly Pi-related) questions for the topic of cross-compiling PHP, such as this one: https://stackoverflow.com/questions/6559480/cross-compiling-php/25708463

Tanja
  • 11
  • 3

0 Answers0