更新 CA 证书将删除所有证书/符号链接

更新 CA 证书将删除所有证书/符号链接

我正在运行 Debian 10 系统。我尝试使用标准流程添加附加证书:将 .crt 文件放在“/usr/local/share/ca-certificates”下并运行“update-ca-certificates”。但是,它并没有按预期运行,而是出现了以下信息:

Updating certificates in /etc/ssl/certs...
find: ‘test’: No such file or directory
find: ‘test’: No such file or directory
find: ‘test’: No such file or directory
Removed orphan symlink /etc/ssl/certs/LuxTrust_Global_Root_2.pem
find: ‘test’: No such file or directory
find: ‘test’: No such file or directory
Removed orphan symlink /etc/ssl/certs/ePKI_Root_Certification_Authority.pem
find: ‘test’: No such file or directory
find: ‘test’: No such file or directory
Removed orphan symlink /etc/ssl/certs/SSL.com_Root_Certification_Authority_ECC.pem
find: ‘test’: No such file or directory
find: ‘test’: No such file or directory
Removed orphan symlink /etc/ssl/certs/Trustis_FPS_Root_CA.pem
find: ‘test’: No such file or directory
find: ‘test’: No such file or directory
Removed orphan symlink /etc/ssl/certs/AffirmTrust_Premium_ECC.pem
find: ‘test’: No such file or directory
Removed orphan symlink /etc/ssl/certs/GDCA_TrustAUTH_R5_ROOT.pem
find: ‘test’: No such file or directory
find: ‘test’: No such file or directory
Removed orphan symlink /etc/ssl/certs/COMODO_Certification_Authority.pem
find: ‘test’: No such file or directory
find: ‘test’: No such file or directory
Removed orphan symlink /etc/ssl/certs/DigiCert_Global_Root_G2.pem
find: ‘test’: No such file or directory

## Many other lines like above omitted for brevity

Removed orphan symlink /etc/ssl/certs/IdenTrust_Commercial_Root_CA_1.pem
Removed orphan symlink /etc/ssl/certs/SwissSign_Gold_CA_-_G2.pem
Removed orphan symlink /etc/ssl/certs/AffirmTrust_Commercial.pem
Removed orphan symlink /etc/ssl/certs/IdenTrust_Public_Sector_Root_CA_1.pem
Removed orphan symlink /etc/ssl/certs/DST_Root_CA_X3.pem
Removed orphan symlink /etc/ssl/certs/Staat_der_Nederlanden_EV_Root_CA.pem
Removed orphan symlink /etc/ssl/certs/Certigna.pem
Removed orphan symlink /etc/ssl/certs/GTS_Root_R2.pem

## Many other lines like above omitted for brevity

Doing .
link ssl-cert-snakeoil.pem -> f6af6c7e.0
139 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...

Warning: there was a problem reading the certificate file /etc/ssl/certs/ACCVRAIZ1.pem. Message:
  /etc/ssl/certs/ACCVRAIZ1.pem (No such file or directory)
Warning: there was a problem reading the certificate file /etc/ssl/certs/AC_RAIZ_FNMT-RCM.pem. Message:
  /etc/ssl/certs/AC_RAIZ_FNMT-RCM.pem (No such file or directory)
Warning: there was a problem reading the certificate file /etc/ssl/certs/Actalis_Authentication_Root_CA.pem. Mes
sage:
  /etc/ssl/certs/Actalis_Authentication_Root_CA.pem (No such file or directory)
Warning: there was a problem reading the certificate file /etc/ssl/certs/AffirmTrust_Commercial.pem. Message:
  /etc/ssl/certs/AffirmTrust_Commercial.pem (No such file or directory)

## Many other lines like above omitted for brevity

看起来该进程出于某种原因正在删除我的符号链接。不用说,我意识到这find: ‘test’: No such file or directory也不正常。

我认为很明显这是配置问题;但是,我不确定该从哪里查找。我检查了通常与该命令关联的所有文件和目录(/etc/ca-certificates.conf/etc/ssl/certs/ca-certificates.crt/usr/share/ca-certificates/usr/local/share/ca-certificates),似乎没有什么问题。我还尝试运行dpkg-reconfigure ca-certificates并重新安装该软件包。但没有任何效果。

哪些其他脚本或配置文件可能会影响此命令的行为?

答案1

该消息表明您的系统缺少该test命令,通常位于 /usr/bin/test(“coreutils” 的一部分)包中。

test(也称为[,如if [ ...)既是外部命令,又是 shell 内置命令——shell 脚本通常使用内置命令,但其他程序仅将其视为独立命令。在本例中,更新脚本使用,由于某种原因,它无法找到 $PATH 中find ... -exec test ... \;命名的命令。test

相关内容