gpt4 book ai didi

linux - 如何通过预置文件安装 rsyslog-pgsql wile install linux with default answers

转载 作者:太空狗 更新时间:2023-10-29 12:29:22 27 4
gpt4 key购买 nike

我有一个安装后脚本:

unset DEBIAN_HAS_FRONTEND DEBIAN_FRONTEND DEBCONF_REDIR DEBCONF_OLD_FD_BASE
export DEBIAN_FRONTEND=noninteractive
aptitude -y install rsyslog-pgsql > /var/tmp/log 2>&1

安装时(ps ax):

17547 tty1     S+     0:00 /usr/bin/perl -w /usr/share/debconf/frontend /var/lib/dpkg/info/rsyslog-pgsql.postinst configure
17587 tty1 S+ 0:00 /bin/sh /var/lib/dpkg/info/rsyslog-pgsql.postinst configure
17828 tty1 S+ 0:00 whiptail --backtitle Package configuration --title Configuring rsyslog-pgsql --output-fd 11 --nocancel --msgbox An error occurred while installing the database: Password: su: System error If at this point you choose "retry", you will be prompted with all the configuration questions once more and another attempt will be made at performing the operation. "retry (skip questions)" will immediately attempt the operation again, skipping all questions. If you choose "abort", the operation will fail and you will need to downgrade, reinstall, reconfigure this package, or otherwise manually intervene to continue using it. If you choose "ignore", the operation will continue, ignoring further errors from dbconfig-common. 18 77

并等待用户选择。如何跳过所有问题并设置为默认?

最佳答案

  1. 安装包

    $ sudo apt -q -y install pkg
  2. 安装 debconf 工具

    # if you don't know the question
    $ sudo apt install debconf-utils
  3. 找到问题(“什么是矩阵?”)

    # find the question you need answered (use less instead)
    $ sudo debconf-get-selections | grep pkg
  4. 卸载包(清除)

    $ sudo apt-get purge pkg
  5. 设置您需要回答的选择

    echo 'pkg       thequestionname      type value' | sudo debconf-set-selections;
  6. 安装包

    sudo apt-get install pkg

如果您升级有新问题的包,您可以在 vagrant 上运行升级,找到问题,然后在生产环境中进行自动升级之前预先设置。

    man debconf-set-selections

跟随黑兔。

关于linux - 如何通过预置文件安装 rsyslog-pgsql wile install linux with default answers,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32310042/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com