0

I have just dusted down my Model 1 B+ RPi and installed the latest Raspbian version from the RPi website. I was following the instructions in Eben Upton's "Raspberry Pi User Guide (3rd edition)" to install a LAMP stack. He suggests running the following commands:

sudo apt-get update
sudo apt-get install apache2 php5 php5-mysql mysql-server

I tried with with my RPi but got these messages:

php5 is not available but is referred to by another package.
This may mean that the package is missing, has been obsoleted or is only available from another 
source.

php5-mysql is not available but is referred to by another package.
This may mean that the package is missing, has been obsoleted or is only available from another 
source.

mysql-server is not available but is referred to by another package.
This may mean that the package is missing, has been obsoleted or is only available from another 
source.
However, the following packages replace it:
mariadb-server.10.0

E: Package 'php5' has no installation candidate
E: Package 'mysql-php5' has no installation candidate
E: Package 'mysql-server' has no installation candidate

Does this mean that php5, mysql etc. are no longer available for the Model 1 B+ or is there an alternative? I just want to use the RPi to pull the data from my PV inverter via our home LAN and store it in a DB, so nothing too taxing for the processor. However, if the Model 1 B+ is basically obsolete and there is no software for it then I will upgrade

** Update ** I found this web page which basically does what I was trying to do but uses the -y argument to sudo apt install - this seems to have done the trick, so it looks like it was user error on my part

1 Answer 1

1

Does this mean that php5, mysql etc. are no longer available for the Model 1 B+

They are no longer available for any model of Pi running a reasonably recent version of RpiOS, or for that matter, any computer anywhere running any reasonably recent operating system of whatever sort.

I did not look up the date of that reference but:

  • Current version of php in RpiOS is 8.2; according to wikipedia security updates for v.5 ended in 2018 so it is very obsolete and unlikey to be in use much of anywhere.
  • MySQL was superseded by MariaDB years ago as well (the latter is a drop-in replacement for the former).

The LAMP stack, which was around long before the Pi and is in much wider spread use (probably still accounts for a significant percentage of internet servers), is what it is; the brand of hardware you deploy it on is largely irrelevant. AFAICT, Pi guides for this kind of thing are/were intended as kid-glove oriented things for people afraid of the "L" word at the start (and/or, less generously, to provide authors with simple means to pad out their content with stuff that is paraphrased or flat out cut n' pasted from any number of thousands of other sources). In short, if this is what you are interested in, find a more recent reference (note though that the "P" in LAMP may stand for a number of different things).

2
  • Hi @golidlocks - the book I referred to was published in 2014 so not surprised things have moved on .... Have installed maria-server and apache2 - tried sudo apt install php (php8) but that produced an error so need to find source for PHP (unless it comes as standard ..)
    – PetGriffin
    Commented Jun 6 at 19:54
  • Edit the error into your question and leave another comment, a little weird that it won't install. My 1B's are defunct, but I just installed via apt php8 on a Pi 3B running 32-bit bullseye (next to last version of RpiOS) and there did not seem to be a problem, that would be the same on a 1B (there's only two versions of the OS, 32-bit and 64-bit, and stuff like this is actually resource light).
    – goldilocks
    Commented Jun 6 at 20:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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