Score:1

curl: (77) error setting certificate verify locations (Ubuntu 20.04.3 LTS)

sd flag

I'm installing Waydroid on Ubuntu, when running:

export DISTRO="focal" && \
sudo curl -# --proto '=https' --tlsv1.2 -Sf https://repo.waydro.id/waydroid.gpg --output /usr/share/keyrings/waydroid.gpg && \
echo "deb [signed-by=/usr/share/keyrings/waydroid.gpg] https://repo.waydro.id/ $DISTRO main" > ~/waydroid.list && \
sudo mv ~/waydroid.list /etc/apt/sources.list.d/waydroid.list && \
sudo apt update

I get the error:

curl: (77) error setting certificate verify locations:                        
  CAfile: /etc/ssl/certs/ca-certificates.crt
  CApath: /etc/ssl/certs

I'm running Ubuntu 20.04.3 LTS (Focal Fossa) and have fully updated the system.

ca-certificates is already the newest version (20210119~20.04.2).
Score:1
sg flag

I encountered the same problem and solved it like this:

$ sudo rm -f /etc/ssl/certs/ca-bundle.crt
$ sudo apt reinstall ca-certificates
$ sudo update-ca-certificates

Somehow the certificate authority chain file got messed up, I guess.

Credits: https://bobcares.com/blog/curl-error-77-problem-with-the-ssl-ca-cert/

sd flag
`sudo update-ca-certificates` allowed the installer to complete. I was a bit wary of running `rm f` (which I misread as `rm -rf`), but could have created a snapshot beforehand.
Score:0
fo flag

I used to get this error when run composer update And I tried all the commands to reinstall the cert file, but the problem was not solved.

I realized that the error is due to permission So the problem was solved with this command

cd /etc/ssl

sudo chmod 755 -R certs/
Score:0
in flag

From the look of the error, you may not have the ca-certificates package installed. You can resolve the issue via Terminal like this:

sudo apt install ca-certificates

Once installed, you should be able to run your cURL request properly

sd flag
`ca-certificates is already the newest version (20210119~20.04.2).`
in flag
Do you have a `/etc/ssl/certs` directory? Are the permissions of all files set to `root:root`?
sd flag
Yes I do, all permissions appear to be `root root`
in flag
Silly question, but what are the permissions on the `certs` directory? The directory itself must have execute permissions in order for cURL and other tools to use it: `drwxr-xr-x`
sd flag
Sorry, should the command `drwxr-xr-x` be detected by bash on a standard Ubuntu installation (a fresh VM)?
in flag
It’s not a command, but the permission list for the directory. The list comes from a stock Ubuntu installation
Score:0
cu flag

I had this same problem. What worked for me was updating the ca-certificates.

I first ran cat /etc/ssl/certs/ca-certificates.crt and got this response:

cat: /etc/ssl/certs/ca-certificats.crt: No such file or directory

Thus, there was no file for curl to use.

According to http://manpages.ubuntu.com/manpages/impish/man8/update-ca-certificates.8.html we can create a new ca-certificate. What I did was run sudo update-ca-certificates and afterward the 77 error went away.

I hope this helps. One note is that I am not very familiar with the update-ca-certificates command, and am unsure if there are some options that can be set to make this fix work better. Also, as is everything with info on the internet, use this at your own risk.

Cheers!

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.