如何在Ubuntu上为PHP 7.1安装bcmath [英] How to install bcmath in Ubuntu for PHP 7.1

查看:583
本文介绍了如何在Ubuntu上为PHP 7.1安装bcmath的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Ubuntu 16服务器通过php7.1进行测试.我的一个应用程序使用了bcadd函数.我知道我需要为此安装bcmath模块,但是找不到php7.1-bcmath.当我尝试安装apt install php-bcmath时,它只是安装了php7.0-bcmath模块.

I'm using an Ubuntu 16 server for testing with php7.1. One of my app uses bcadd function. I know that I need to install bcmath module for that but I'm unable to find php7.1-bcmath. When I tried to install apt install php-bcmath, it simply installed php7.0-bcmath module.

我无法在要安装在服务器上的任何位置找到php7.1-bcmath模块.有人有主意吗?

I was unable to find php7.1-bcmath module anywhere to install on my server. Does anybody has an idea?

apt install php7.1-bcmath返回了以下内容,

E: Unable to locate package php7.1-bcmath

E: Couldn't find any package by glob 'php7.1-bcmath'

E: Couldn't find any package by regex 'php7.1-bcmath'

推荐答案

回答我自己的问题.可以通过以下回购更新来解决此问题.

Answering my own question. Managed to fix this issue with following repo update.

add-apt-repository ppa:ondrej/php
apt update
apt install php7.1-bcmath

重新启动apache,一切顺利.

Restart apache and all good to go.

这篇关于如何在Ubuntu上为PHP 7.1安装bcmath的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆