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

PetGriffin
  • 101
  • 1

1 Answers1

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).

goldilocks
  • 60,325
  • 17
  • 117
  • 234