【问题标题】:dpkg -i running in background after installdpkg -i 安装后后台运行
【发布时间】:2012-10-11 21:08:15
【问题描述】:

我自己的 dpkg 没有正确安装。 我跑:

:~# dpkg -i foo-2.1-2.deb

当我的包安装完成时。

:~# ps aux | grep foo | grep -v grep

root      1718  2.2  1.4  10080  7308 ttyS0    S    11:59   0:03 dpkg -i foo-2.1-2.deb
root      1731  0.0  0.0   1720   496 ttyS0    S    11:59   0:00 /bin/sh /var/lib/dpkg/info/foo-2.1-2.postinst configure 2.1-2

我认为我的 postinst 脚本没有正确终止,

我错过了一些东西,但不知道是什么。

【问题讨论】:

  • 您真的不想从 postinst 脚本中调用 apt-get。如果你想安装其他东西,你应该在你的包中设置一个依赖,但你可能想建议不要依赖,并且可能只是一个通用的网络服务器,而不是一个特定的。
  • @Flexo 这是一个非常特殊的情况,在发生其他任何事情之前必须安装 lighttpd。
  • 这正是 Pre-Depends 的用途。您不能从 postinst 调用 apt-get。
  • 好的,postinst 中没有 apt-get。这会强制 lighttpd 自动安装吗?
  • 是的,它会在安装你的包之前强制安装它。我不确定你是否需要比 Depends 更强大的东西。

标签: dpkg post-install


【解决方案1】:

我终于明白了。我的一个由 postinst 调用的脚本称为 /bin/bash,它启动了一个新的 shell,导致 dpkg 在后台运行并且永远不会完成。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2010-12-12
    • 2012-11-11
    • 1970-01-01
    • 1970-01-01
    • 2011-08-12
    • 2016-12-29
    相关资源
    最近更新 更多