mkcert icon indicating copy to clipboard operation
mkcert copied to clipboard

mkcert -install` fails to run on Arch based system

Open Lvceo opened this issue 5 years ago • 4 comments

After installing the necessary package required in the installation note, I run the first command

mkcert -install
ERROR: failed to execute "update-ca-certificates": exec: "update-ca-certificates": executable file not found in $PATH

It seems he is searching for update-ca-certificates command, but Arch is providing a sightly different command to do the same job trust I think this case should be taken into account to make the mkcert -install to run correctly. Thank you

Lvceo avatar Jan 08 '21 06:01 Lvceo

Has this issue been already solved?

I tried to reproduce this issue with arch 21-01 (latest) running in VirtualBox, mkcert -install works fine.

Environment:

uname -a:
Linux archiso 5.10.3-arch1-1 #1 PREEMPT Sun, 27 Dec 2020 ...
go version:
go version go1.15.7 linux/amd64
mkcert:
version: 1a5aaff (master)

mikhailal avatar Jan 22 '21 21:01 mikhailal

mkcert supports trust, but it looks like your system also has a different store that is usually managed with update-ca-certificates. If this is a common setup that you can help us reproduce, we can look into handling it better.

https://github.com/FiloSottile/mkcert/blob/1a5aaff12e0edb54f32ce187079d05c4a1ffd19b/truststore_linux.go#L38-L43

FiloSottile avatar Jan 24 '21 15:01 FiloSottile

I am not the OP, but I also run Arch Linux and was successful using this tool I just discovered today. I installed mkcert using pacman and used mkcert -install to succesfully create cert for a web server I'm using now.

jahway603 avatar Feb 15 '21 05:02 jahway603

I am also running arch linux and I think I see the problem. I did have update-ca-certificates installed, and just started using the new trust command. This folder does exist:

ls -l /usr/local/share/ca-certificates
total 8
-rw-r--r-- 1 root root 1651 May 24 14:47 mkcert_development_CA_325307668194152792698134515606529139355.crt
-rw-r--r-- 1 root root 1168 Apr 19 10:49 RootCA.pem

I followed the instructions here https://archlinux.org/news/ca-certificates-update/ (most importantly moving /usr/local/share/ca-certificates/*.crt to /etc/ca-certificates/trust-source/anchors/) and then removed /usr/local/share/ca-certificates. Everything seems to work fine now, but I think this could be seamless if mkcert just prioritizes the trust command over update-ca-certificates if trust is available.

andykais avatar May 24 '21 19:05 andykais