The title error occurred when executing the following framework on AWS EC2 (Amazon Linux). ・ When executing Laravel migrate · When running CakePHP's build-in server
PHP7.2 PostgreSQL 10 series
Execute the following command to find the module that suits your environment
$ yum search php-pdo
Then, it will be displayed as follows.
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
242 packages excluded due to repository priority protections
=========================================================================================================== N/S matched: php-pdo ============================================================================================================
php-pdo.x86_64 : A database access abstraction module for PHP applications
php-pdo-dblib.x86_64 : PDO driver Microsoft SQL Server and Sybase databases
php54-php-pdo.x86_64 : A database access abstraction module for PHP applications
php55-php-pdo.x86_64 : A database access abstraction module for PHP applications
php56-php-pdo.x86_64 : A database access abstraction module for PHP applications
php70-php-pdo.x86_64 : A database access abstraction module for PHP applications
php70-php-pdo-dblib.x86_64 : PDO driver Microsoft SQL Server and Sybase databases
php71-php-pdo.x86_64 : A database access abstraction module for PHP applications
php71-php-pdo-dblib.x86_64 : PDO driver Microsoft SQL Server and Sybase databases
php72-php-pdo.x86_64 : A database access abstraction module for PHP applications
php72-php-pdo-dblib.x86_64 : PDO driver Microsoft SQL Server and Sybase databases
php73-php-pdo.x86_64 : A database access abstraction module for PHP applications
php73-php-pdo-dblib.x86_64 : PDO driver Microsoft SQL Server and Sybase databases
php74-php-pdo.x86_64 : A database access abstraction module for PHP applications
php74-php-pdo-dblib.x86_64 : PDO driver for Microsoft SQL Server and Sybase databases
php74-php-pdo-firebird.x86_64 : PDO driver for Interbase/Firebird databases
Name and summary matches only, use "search all" for everything.
Since the version of PHP used this time is PHP 7.2, execute the following command to install PDO
$ sudo yum install php72-php-pdo
This eliminates the error. Don't accidentally install another version.
Recommended Posts