6

When entering artisan commands in laravel- ubuntu 20.04 it shows following error

PHP Warning: Cannot load module "http" because required module "raphf" is not loaded in Unknown on line 0

PHP version 8.1.1, Laravel 8 , Ubuntu 20.04

screen shot

karel
  • 122,292
  • 133
  • 301
  • 332
hemil
  • 163

2 Answers2

13

Installing the package solved the issue for me:

$ sudo apt install php-raphf
Jakke
  • 1,108
  • 1
  • 13
  • 26
5

Some more details. This occurs when you switch PHP versions - it happened to me when I switched to PHP 8.

If you check for your installed version of php-raphf with

apt list php-raphf

You will notice that you (most likely) have it. However, if you run

$ sudo apt install php-raphf

as described above, Ubuntu will install a PHP-dependent version:

The following NEW packages will be installed:
  php-raphf php8.1-raphf