skip to Main Content

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?

2

Answers


  1. Chosen as BEST ANSWER

    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?


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

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search