Debian - 无人值守升级:环境变量

Debian - 无人值守升级:环境变量

我需要为无人值守升级设置环境变量:

Packages that attempted to upgrade:
msodbcsql17

Package installation log:
Log started: 2019-10-28 06:51:03
apt-listchanges: Reading changelogs...
Preconfiguring packages ...
Preparing to unpack .../msodbcsql17_17.4.2.1-1_amd64.deb ...
ERROR: The EULA was not accepted. Installation aborted.
dpkg: error processing archive /var/cache/apt/archives/msodbcsql17_17.4.2.1-1_amd64.deb (--unpack):
new msodbcsql17 package pre-installation script subprocess returned error exit status 1
Errors were encountered while processing:
/var/cache/apt/archives/msodbcsql17_17.4.2.1-1_amd64.deb
Log ended: 2019-10-28 06:51:05

Microsoft 需要为尝试安装 msodbcsql17 的用户设置“ACCEPT_EULA=Y”。我已经将该行添加到“/etc/environment”中,该行对于 shell 用户运行良好,但不适用于无人值守升级。

我没有成功浏览文档以找到解决方案。我可以使用 Systemd 服务文件注入 ENV,但如果无人值守升级允许在某处指定它们,它会更干净。

有任何想法吗?

相关内容