(我刚从ubuntu 18.04 迁移到 Ubuntu 20.04。)
我无法理解的
- 下面解释了我如何解决问题的过程和细节,但我真的不明白它所说的部分
php7.4-mysql : Depends: php7.4-common (= 7.4.3-4ubuntu2.2) but 7.4.9-1+ubuntu18.04.1+deb.sury.org+1 is to be installed
E: Unable to correct problems, you have held broken packages.
- 我可以理解该软件包
php7.4-mysql
取决于on php7.4-common
(已安装,因此我看不到那里的问题),但它也说(= 7.4.3-4ubuntu2.2)
然后我迷路了... 7.4.3-4ubuntu2.2?那是什么?如果这还不够复杂,它会增加......but 7.4.9-1+ubuntu18.04.1+deb.sury.org+1
然后我就是不知道如何超越这个。
更多见解
- 我知道有人问过类似的问题,我已经阅读了它们,并且发布的解决方案似乎无法解决我的问题。我正在尝试
$ php artisan migrate
在我自己的生产环境中使用该命令(我租用了一个主机,我只是在搞乱它),我得到了输出......
Illuminate\Database\QueryException
could not find driver (SQL: select * from information_schema.tables where table_schema = gastigram and table_name = migrations and table_type = 'BASE TABLE')
at vendor/laravel/framework/src/Illuminate/Database/Connection.php:671
667| // If an exception occurs when attempting to run a query, we'll format the error
668| // message to include the bindings with SQL, which will make this exception a
669| // lot more helpful to the developer instead of just the database's errors.
670| catch (Exception $e) {
> 671| throw new QueryException(
672| $query, $this->prepareBindings($bindings), $e
673| );
674| }
675|
+34 vendor frames
35 artisan:37
Illuminate\Foundation\Console\Kernel::handle()
- 我用谷歌搜索,他们说是缺少驱动程序的问题,有道理...它说那里缺少驱动程序,所以我尝试安装 php7.4-mysql 驱动程序,但后来...
$ sudo apt install php7.4-mysql
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
php7.4-mysql : Depends: php7.4-common (= 7.4.3-4ubuntu2.2) but 7.4.9-1+ubuntu18.04.1+deb.sury.org+1 is to be installed
E: Unable to correct problems, you have held broken packages.
由于包损坏,如何解决未满足的依赖关系的问题?
获得帮助
- 我
$ apt-cache policy php7.4-common
按照@guiverc 的建议运行
这是输出
php7.4-common:
Installed: 7.4.9-1+ubuntu18.04.1+deb.sury.org+1
Candidate: 7.4.9-1+ubuntu18.04.1+deb.sury.org+1
Version table:
*** 7.4.9-1+ubuntu18.04.1+deb.sury.org+1 100
100 /var/lib/dpkg/status
7.4.3-4ubuntu2.2 500
500 http://us.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
500 http://us.archive.ubuntu.com/ubuntu focal-security/main amd64 Packages
7.4.3-4ubuntu1 500
500 http://us.archive.ubuntu.com/ubuntu focal/main amd64 Packages