Curl Error

I am trying OpenVPN going. When I run:
sudo curl ifconfig.me

I get the error:
curl: symbol lookup error: curl: undefined symbol: curl_url_set, version CURL_OPENSSL_4

I tried the sudo apt install curl net-tools but that was up to date.

It could be a version 3 vs a version 4 issue (everything is version 4 now) but I can’t seem to fix it. Any ideas?

Emily

Hello @TNlass!
This issue is not directly connected to the curl itself, but on the secure shell (ssh) or secure connection libraries. The most likely scenario is that there is a version missmatch.

First, is this error occuring on your VPS or your local system?

I am still working on my local system. Didn’t want to go further and mess something up.

I found a comment after a search about v3 vs v4 on a library file and updated but get the same error.

Try to open up a terminal and go to:

cd /usr/lib/x86_64-linux-gnu/

Then check if the curl links are there, by typing:

ls -l libcurl*

It should look something like the following:

If not, can you post a screen capture of the ls commend?

It looks the same as yours!

Hey @TNlass!
What does the command:

hash -d curl

give you?

Nothing. Nada. τίποτα

How about:

sudo ldconfig

And then try the:

sudo curl ifconfig.me

Does it produce an error again?

Looks like the same error!

There is one scenario where a full update/upgrade solved the issue on Ubuntu 20.10 - as it might as well be a dependency version mismatch. In terminal, try this:

sudo apt update && sudo apt upgrade -y

Then reboot and see if that helps.

It didn’t update to 20.10. I got the following messages/errors. I see Brave seems to be triggering it. So I uninstalled Brave and tried again but the same thing happened. I did find some files in the ~/snap/brave folder. I’ll paste that separately. I reinstalled Brave and got the same error again. I did have trouble the first time I tried to install Brave but when I tried a few days later it seemed to work fine.

Here’s the files for Brave.
image

not sure what the current ->142 is or the . and … I think I read I have to remove all files before I can remove a directory.

In order to install and verify the key for the Brave browser’s repository, you’ll need to execute the following command:

sudo curl -fsSLo /usr/share/keyrings/brave-browser-archive-keyring.gpg https://brave-browser-apt-release.s3.brave.com/brave-browser-archive-keyring.gpg

Then try the update and upgrade commands from above.

Note: The above code is single-line, so copy and paste it all in your terminal as is.

(Hopefully, curl won’t kick on this command)

However, if curl does kick, run the:

sudo apt upgrade -y

Anyways.

Hi Vasileios,
I ended up installing Ubuntu 21.10 on the computer and then starting again. Every thing worked and I now have my VPS set up securely and the VPN running :smiley:

I am currently installing Ubuntu 21.10 on another computer (last Windows unit in the house). I was going to set up SSH and VPN on it. Question: Do I use the same key (copy the key and key.pub files to the new computer) or do I need to generate another key on the new computer? and then transfer the key to the VPS?

Thanks for all your help! Emily

1 Like

Congratulations on getting out of that precarious situation, Emily!

The SSH should be a personal identifier of each system separately, so if you simply try to copy the other key over, unless all accounts (and hostname) are identical, you’ll encounter a validation error.

The best way is to go to the terminal and execute:

ssh-keygen

– for your new system.

Since you’ve completed the VPN setup and the security aspects of your VPS, installing new SSH keys on it will require a bit of a process. However, you do not need to do it just to gain VPN access, unless you wish to control your VPS from another computer. For the VPN, you simply generate a new configuration file for your new computer.

If you need to access your VPS from another system, the process is the following (you can repeat that for any new system):

What you will need is to go to your VPS provider and use their web terminal to login as root. Once you do that, execute:

nano /etc/ssh/sshd_config

Navigate to PasswordAuthentication and set it to yes.

Press CTRL+O and then Enter to save. Then hit CTRL+X to exit.
Once back in terminal, execute:

systemctl restart sshd

This will allow the new SSH keys to be copied to your VPS from the new system. Exit the terminal via the exit command. Then, go to the terminal of your new system and type in:

ssh-copy-id username@x.x.x.x

Where username is your non-root actual username on the VPS, and x.x.x.x is your VPS’ IP address.
Once you hit enter, it will ask you for your VPS user’s password (which is why we re-enabled it on the SSH configuration).

Once it is done, it means that your new computer’s key has been added to the VPS.

Then test the connection by typing:

ssh username@x.x.x.x

– from your new system.
Once you’re logged in, type in:

sudo su
nano /etc/ssh/sshd_config

Navigate to the PasswordAuthentication again and set it back to no. CTRL+O then Enter to save. CTRL+X to exit. Once you exit, execute:

systemctl restart sshd
exit

This will exit root mode and you can type in another exit to completely disconnect from your VPS.

And with that, you’re all set!

Thanks for this. I’ll try it. It would be good to be able to access the VPS from more than one computer.

1 Like