0

I upgraded Ubuntu from 18 to 20.04. After upgrade, my codeignator is not working.

Type: Error Message: Undefined class constant 'MYSQL_ATTR_INIT_COMMAND'
Filename: /var/www/tech/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php
Line Number: 145

I tried below command resulting in this error:

sudo apt-get install php7.4-mysql

The following packages have unmet dependencies:

php7.4-mysql : Depends: php7.4-common (= 7.4.3-4ubuntu2.4) but 7.4.13-1+ubuntu18.04.1+deb.sury.org+1 is to be installed E: Unable to correct problems, you have held broken packages.
Marc Vanhoomissen
  • 2,198
  • 6
  • 24
  • 36
  • Please add output of `dpkg -l | grep "deb.sury.org"` to the question. – N0rbert Jan 10 '21 at 18:23
  • He's likely using this PPA: https://launchpad.net/~ondrej/+archive/ubuntu/php People use this PPA because it allows them to use php versions not yet available in the official Ubuntu repos. Usually there is not much choice whether to use it or not: sometimes mainstream frameworks, like Symfony depend on very recent php versions; if they want to use an up-to-date version of these frameworks, they need the PPA. – Levente Jan 10 '21 at 18:49
  • Hi, it working thank you.. – mayasakthi Jan 11 '21 at 05:19
  • 2
    Does this answer your question? [Unable to correct problems, you have held broken packages](https://askubuntu.com/questions/223237/unable-to-correct-problems-you-have-held-broken-packages) – karel Jan 11 '21 at 14:44

0 Answers0