I am planing on hosting my laravel application on my RaspberryPi that's connected locally. I have my DynDns domain setup and everything. Now i just need to get PHP7.2 on my raspberry and from what i've i need to add buster to my repository list and then i should be able to get PHP7.2 but i get the following error when i run the command to install php7.2:

The value 'buster' is invalid for APT::Default-Release as such a release is not available in the sources

I'm not sure how to continue with this, how i can fix it and why this is happening. Note that i used this guide to set up buster. You can scroll down to "Install PHP 7.2" to see what i have done.

  • What happens when you apt-get update, apt-get upgrade? – Michael Prokopec Feb 3 at 18:48
  • pastebin.com/rz5gvLbY You can see the output here – mike6715b Feb 4 at 14:19
  • Looks like your connection is not stable are you using wifi? Does your rpi have a metal case? – Michael Prokopec Feb 4 at 14:44
  • Its connected via ethernet – mike6715b Feb 4 at 14:46
  • Either your gpg keys are not there for the servers your trying to get updates from or your sources.list file is amiss or they are down for some reason or just not reachable for some reason. I posted a solution below. – Michael Prokopec Feb 4 at 15:09

Why not download the source from php's website and then make, make install it? Instead of upgrading your pi to a not yet fully supported distro.

All you need is to, apt-get install build-essential, then download the php7.2 from php directly, then go into the directory you have it in and follow the readme which should be something like the following:

make install

If you can't install build-essential because of this issue I would look into undoing all the things you did to try to install php7.2. Then reconstruct your sources.list to default.

Also, if other dependency issues arise during the configure and make phases, install the missing dependencies.

  • Will attempt solution and get back to you.. – mike6715b Feb 4 at 15:18
  • @mike6715b Ok, hope it works for you. – Michael Prokopec Feb 4 at 15:19
  • Now getting new error at the end of ./configure Pastebin: pastebin.com/hhfpUkyK – mike6715b Feb 4 at 15:41
  • @mike6715b looks like you need to install libxml2. – Michael Prokopec Feb 4 at 15:49
  • 1
    In Debian you will need the -dev packages for compiling from source, in this case libxml2-dev. – Paul H. Feb 4 at 17:24

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.