我有一个Bash脚本,它创建了一个.img文件,该文件将被复制到用于ARM设备的SD卡上。
执行debootstrap命令以安装最小的Debian拉伸系统(armhf),然后在chroot (软件安装、用户创建.)中执行脚本。
最近,当我需要升级Buster时,我将debootstrap命令分发参数更改为"buster“。但是,当我试图安装带有bundle install:SSL错误:无法获得本地颁发者证书的软件时,会出现一个错误。事实证明,即使是curl在HTTPS网站上也出现了类似的错误。
What我检查了
update-ca-certificates已运行。What我试过
openssl s_client -connect ifconfig.me:443失败,unable to get local issuer certificate失败curl -k显然起作用了curl --cacert /etc/ssl/certs/ca-certificates.crt工程curl和bundle install works上用Buster生成一个D21文件How来复制问题
touch buster_arm.img
truncate --size=2G buster_arm.img # 1G might not be enough
losetup --show --find --partscan --nooverlap buster_arm.img # should be /dev/loop0
parted --align optimal --script /dev/loop0 mklabel msdos mkpart primary 0% 100%
mkfs.ext4 /dev/loop0p1
mount /dev/loop0p1 /mnt/buster_arm
# replace buster by stretch and curl will work
# replace armhf by amd64 and curl will work
debootstrap --arch armhf --variant=minbase buster /mnt/buster_arm https://deb.debian.org/debian/
mount --bind /dev/ /mnt/buster_arm/dev
mount --bind /dev/pts /mnt/buster_arm/dev/pts
cp "$(command -v qemu-arm-static)" /mnt/buster_arm/usr/bin/qemu-arm-static # bypass architecture (my computer is not on armhf)
chroot /mnt/buster_arm /bin/bash
apt-get update && apt-get install ca-certificates curl apt-transport-https && update-ca-certificate
curl https://google.fr我真的很困惑,有没有人曾经面对过这样的问题?
谢谢你的帮助!
发布于 2020-12-06 09:01:02
我发现问题出在哪里了。
它与openssl重散命令相关,由update证书执行,它应该在/etc/ssl/certs中创建额外的链接。
在我的例子中,它无法创建“散列链接”(https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg1725724.html)。
我必须手动运行/usr/bin/c_rehash。
一旦系统在ARM设备上运行,在chroot之外,这可能不是一个问题。我一试就会更新这个答案。
https://serverfault.com/questions/1045118
复制相似问题