如何为Laravel安装所有必需的PHP扩展? [英] How to install all required PHP extensions for Laravel?

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

问题描述

我需要制作我的Ubuntu 16.04.有没有使用GUI的方法,还是使用终端执行此操作的最简单方法?

I need to make my Ubuntu 16.04. Is there a way using the GUI or is the simplest way to do this by using terminal?

我已经安装了PHP 7.1,MariaDB.

I have already installed PHP 7.1, MariaDB.

我需要启用:

  1. OpenSSL PHP扩展
  2. PDO PHP扩展
  3. Mbstring PHP扩展
  4. Tokenizer PHP扩展
  5. XML PHP扩展

推荐答案

Laravel 服务器要求提到BCMathCtypeJSONMbstringOpenSSLPDOTokenizerXML扩展名是必需的.默认情况下,大多数扩展都已安装并启用.

Laravel Server Requirements mentions that BCMath, Ctype, JSON, Mbstring, OpenSSL, PDO, Tokenizer and XML extensions are required. Most of the extensions are installed and enabled by default.

您可以在Ubuntu中运行以下命令以确保已安装扩展.

You can run the following command in Ubuntu to make sure the extensions are installed.

sudo apt install openssl php-common php-curl php-json php-mbstring php-mysql php-xml php-zip

特定于PHP版本的安装(如果已安装PHP 7.4)

PHP version specific installation (if PHP 7.4 installed)

sudo apt install php7.4-common php7.4-bcmath openssl php7.4-json php7.4-mbstring

对于作曲家软件包,您可能需要其他PHP扩展.从下面的链接中查找.

You may need other PHP extensions for your composer packages. Find from links below.

适用于Ubuntu 16.04 LTS(Xenial)的PHP扩展

适用于Ubuntu 18.04 LTS(仿生)的PHP扩展

这篇关于如何为Laravel安装所有必需的PHP扩展?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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