0

I do everything according to the instructions: PHP | "The requested PHP extension bcmath is missing from your system."

apt-get update
apt-get install php7.2-bcmath

I get:

Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package php7.2-bcmath E: Couldn't find any package by regex 'php7.2-bcmath'

Why the system cannot find this module?

  • Available is https://packages.debian.org/search?suite=default&section=all&arch=any&searchon=names&keywords=bcmath – Knud Larsen Jun 08 '21 at 22:58

2 Answers2

1

Use deb.sury.org Just add https://packages.sury.org/php/ to Your apt/sources.list, and voila. There is php7.2-bcmath and a lot of other php stuff

JFK
  • 56
  • 3
0

It doesn't work for me. I added the code to the file (8th line)

deb http://mirror.hetzner.de/debian/packages jessie main contrib non-free
deb http://http.debian.net/debian jessie main contrib non-free
deb http://http.debian.net/debian/ jessie-updates main contrib non-free
deb http://security.debian.org/ jessie/updates main contrib non-free
# deb http://ftp.debian.org/debian jessie-backports main contrib non-free
deb http://http.us.debian.org/debian/ jessie main
# deb http://ftp.debian.org/debian stable main contrib
deb https://packages.sury.org/php/

and it shows the error:

E: Malformed line 8 in source list /etc/apt/sources.list (dist) E: The list of sources could not be read.

So I added at the end last line: "jessie main"

deb http://mirror.hetzner.de/debian/packages jessie main contrib non-free
deb http://http.debian.net/debian jessie main contrib non-free
deb http://http.debian.net/debian/ jessie-updates main contrib non-free
deb http://security.debian.org/ jessie/updates main contrib non-free
# deb http://ftp.debian.org/debian jessie-backports main contrib non-free
deb http://http.us.debian.org/debian/ jessie main
# deb http://ftp.debian.org/debian stable main contrib
deb https://packages.sury.org/php/ jessie main

Now I have the same as before:

Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package php7.2-bcmath E: Couldn't find any package by regex 'php7.2-bcmath'

Why am I still unable to install this package?