AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-944285

newbie's questions

Martin Hope
newbie
Asked: 2020-09-09 19:31:30 +0800 CST

如何解决由于包装损坏而未满足的依赖关系?[复制]

  • 2
这个问题在这里已经有了答案:
如何恢复默认存储库? (4 个回答)
无法纠正问题,你拿着坏了的包裹 (15个回答)
1 年前关闭。

(我刚从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
php mysql laravel
  • 1 个回答
  • 2358 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve