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

3
  • This is really a question about how to downgrade a package in Arch linux and should be researched as such. unix.stackexchange.com/search?q=%5Barch-linux%5D+downgrade
    – goldilocks
    Dec 22 '19 at 18:39
  • @goldilocks Thanks for your quick response. I already have researched the topic as such extensively and as it turns out, there are no older packages available for download, leading me to ask how to cross-compile PHP for the Raspberry Pi.
    – Bernd-L
    Dec 22 '19 at 18:41
  • I'm not an arch user but a quick search for "arch downgrade php" turned up this: linode.com/community/questions/18896/… ...Which may be a tidier option. While it does mean compiling on the Pi, I would think twice about cross-compiling php if this post represents where you are with that.
    – goldilocks
    Dec 22 '19 at 18:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.