How to install all required PHP extensions for Laravel?

久未见 提交于 2020-02-12 08:51:39

问题


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?

I have already installed PHP 7.1, MariaDB.

I need to enable:

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

回答1:


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

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 version specific installation (if PHP 7.4 installed)

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

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

PHP extensions for Ubuntu 16.04 LTS (Xenial)

PHP extensions for Ubuntu 18.04 LTS (Bionic)



来源:https://stackoverflow.com/questions/40815984/how-to-install-all-required-php-extensions-for-laravel

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!