Install PHP extensions for Laravel 8 on Arch Linux

Author
By Darío Rivera
Posted On in Arch Linux

In our previous post we saw how install PHP extensions in Arch Linux. In today's post we will install all those extensions required in Laravel 8. For the purposes of this post we will assume that you have the latest version of Arch Linux and that you previously installed PHP 7.4.

Requirements

The following extensions are required in version 8 of Laravel.

- PHP >= 7.3
- BCMath PHP Extension
- Ctype PHP Extension
- Fileinfo PHP extension
- JSON PHP Extension
- Mbstring PHP Extension
- OpenSSL PHP Extension
- PDO PHP Extension
- Tokenizer PHP Extension
- XML PHP Extension

Installation

To install these extensions just run the following command.

sudo pacman -S php-intl

The following extensions must be enabled in the php.ini file. To find the path to the php configuration file you can run the following command:

php -i | grep php.ini

Once this is done you must uncomment the respective lines.

extension=bcmath
extension=intl

Other extensions that you may need if you consume web services are the following and they should be uncommented as well.

extension=curl
extension=soap

If you are going to use MySQL as database you will also need to enable the following extension.

extension=pdo_mysql

If you also plan to use Redis for queues you will need to install php-redis.

sudo pacman -S php-redis

And if you are developing and your redis server is on the same machine you should install the redis server.

sudo pacmann -S redis

Acerca de Darío Rivera

Author

Application Architect at Elentra Corp . Quality developer and passionate learner with 10+ years of experience in web technologies. Creator of EasyHttp , an standard way to consume HTTP Clients.

LinkedIn Twitter Instagram

Sólo aquellos que han alcanzado el éxito saben que siempre estuvo a un paso del momento en que pensaron renunciar.