justinquinn I've tried your steps but didn't have luck. I'm not working with a VM so creating a new account isn't an option, unfortunately. I created a new account on this computer but I still get the same error.

Basically, when I run wget I get the following error:
ERROR: cannot verify URL's certificate, issued by ‘CN=Let's Encrypt Authority X3,O=Let's Encrypt,C=US’:
Unable to locally verify the issuer's authority.

I was doing some research and it seems that I removed some SSL certificates ('ca-certificate') somehow while uninstalling the first OpenSSL I'd installed before.

$ dpkg -l curl wget ca-certificates openssl
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-============================-===================-===================-=============================================================
un ca-certificates <none> <none> (no description available)
ii curl 7.47.0-1ubuntu2.13 amd64 command line tool for transferring data with URL syntax
ii openssl 1.0.2g-1ubuntu4.15 amd64 Secure Sockets Layer toolkit - cryptographic utility
ii wget 1.17.1-1ubuntu1.5 amd64 retrieves files from the web

This is the reason why I can't access any URL and be able to download their files (I think). I was trying to find a way to install these certificates again (I think I need one called Let's Encrypt Authority X3) but I'm a little bit lost.
I was looking at these websites in order to solve this issue:

I don't know if you can help me with this. Nonetheless, thanks a lot for your patience and time throughout these days.

    iisola97 Hi Ignacio,
    No worries: I'm happy to help and am sorry this process has been so frustrating for you.

    You shouldn't need Let's Encrypt: that package is more for creating SSL certificates on the server side.

    Can you try this: sudo update-ca-certificates?

      justinquinn I really appreciate your help. Thanks, Justin.
      This is what I got:

      $ sudo update-ca-certificates
      [sudo] password for ignacio:
      sudo: update-ca-certificates: command not found

        iisola97 Okay, another thing occurred to me: I'm guessing that when you uninstalled the manually-installed version of OpenSSL, you removed /usr/local/ssl entirely? Regardless, let's try restoring missing files if possible with sudo apt-get update; sudo apt-get upgrade, then test wget/curl again. Let me know what happens.

          justinquinn There are still some files under /usr/local/ssl:
          /usr/local/ssl$ ls -l
          total 44
          drwxr-xr-x 2 root root 4096 Jun 26 11:03 certs
          -rw-r--r-- 1 root root 414 Jun 26 11:03 ct_log_list.cnf
          -rw-r--r-- 1 root root 414 Jun 26 11:03 ct_log_list.cnf.dist
          drwxr-xr-x 2 root root 4096 Jun 26 11:03 misc
          -rw-r--r-- 1 root root 10998 Jun 26 11:03 openssl.cnf
          -rw-r--r-- 1 root root 10998 Jun 26 11:03 openssl.cnf.dist
          drwxr-xr-x 2 root root 4096 Jun 26 11:03 private

          I ran sudo apt-get update; sudo apt-get upgrade, and got a long list of commands being executed and at the end this:

          Fetched 186 MB in 10s (17.2 MB/s)
          E: Failed to fetch
          https://repo.skype.com/deb/pool/main/s/skypeforlinux/skypeforlinux_8.47.0.59_amd64.deb`

          E: Unable to fetch some archives, try running apt-get update or apt-get --fix-missing.
          ignacio@mangala:~$ wget https://www.openssl.org/source/openssl-1.1.1.tar.gz
          --2019-06-27 19:16:26-- https://www.openssl.org/source/openssl-1.1.1.tar.gz
          Resolving www.openssl.org (www.openssl.org)... 104.93.192.141, 2600:140a:0:399::c1e, 2600:140a:0:389::c1e
          Connecting to www.openssl.org (www.openssl.org)|104.93.192.141|:443... connected.
          ERROR: cannot verify www.openssl.org's certificate, issued by ‘CN=Let's Encrypt Authority X3,O=Let's Encrypt,C=US’:
          Unable to locally verify the issuer's authority.
          To connect to www.openssl.org insecurely, use
          --no-check-certificate'.`

            justinquinn it worked!!!
            Autotools installed perfectly. I will move onto the next external packages and let you know if I come up with any error.
            Thanks a lot!!

            I am following the steps provided in $ISSM_DIR/jenkins/linux64_ross.
            As I said, autotools ran perfectly. The next external package is cmake, and I got this:

            Scanning dependencies of target cmlibarchive
            [ 45%] Building C object Utilities/cmlibarchive/libarchive/CMakeFiles/cmlibarchive.dir/archive_acl.c.o
            [ 46%] Building C object Utilities/cmlibarchive/libarchive/CMakeFiles/cmlibarchive.dir/archive_check_magic.c.o
            [ 46%] Building C object Utilities/cmlibarchive/libarchive/CMakeFiles/cmlibarchive.dir/archive_cmdline.c.o
            [ 46%] Building C object Utilities/cmlibarchive/libarchive/CMakeFiles/cmlibarchive.dir/archive_cryptor.c.o
            In file included from /home/ignacio/research/mars/ISSM_source/trunk/externalpackages/cmake/install/Utilities/cmlibarchive/libarchive/archive_cryptor.c:32:0:
            /home/ignacio/research/mars/ISSM_source/trunk/externalpackages/cmake/install/Utilities/cmlibarchive/libarchive/archive_cryptor_private.h:107:17: error: field ‘ctx’ has incomplete type
            EVP_CIPHER_CTX ctx;
            ^
            Utilities/cmlibarchive/libarchive/CMakeFiles/cmlibarchive.dir/build.make:134: recipe for target 'Utilities/cmlibarchive/libarchive/CMakeFiles/cmlibarchive.dir/archive_cryptor.c.o' failed
            make[2]: *** [Utilities/cmlibarchive/libarchive/CMakeFiles/cmlibarchive.dir/archive_cryptor.c.o] Error 1
            CMakeFiles/Makefile2:1728: recipe for target 'Utilities/cmlibarchive/libarchive/CMakeFiles/cmlibarchive.dir/all' failed
            make[1]: *** [Utilities/cmlibarchive/libarchive/CMakeFiles/cmlibarchive.dir/all] Error 2
            Makefile:160: recipe for target 'all' failed
            make: *** [all] Error 2

              iisola97 From what I can see, this is an issue with the latest currently available version of OpenSSL on apt. Let's try this: sudo apt-get remove openssl; sudo apt-get install openssl=1.0.2. If the installation fails, check apt-cache madison openssl to see what versions are available that are closest to 1.0.2, modify the second command and rerun it.

                justinquinn I did that and reran it, but I didn't have luck.
                I'm pasting this just in case this has something to do with the error I pasted above:

                -- Checking support for ARCHIVE_CRYPTO_MD5_LIBC
                -- Checking support for ARCHIVE_CRYPTO_MD5_LIBC -- not found
                -- Checking support for ARCHIVE_CRYPTO_RMD160_LIBC
                -- Checking support for ARCHIVE_CRYPTO_RMD160_LIBC -- not found
                -- Checking support for ARCHIVE_CRYPTO_SHA1_LIBC
                -- Checking support for ARCHIVE_CRYPTO_SHA1_LIBC -- not found
                -- Checking support for ARCHIVE_CRYPTO_SHA256_LIBC
                -- Checking support for ARCHIVE_CRYPTO_SHA256_LIBC -- not found
                -- Checking support for ARCHIVE_CRYPTO_SHA384_LIBC
                -- Checking support for ARCHIVE_CRYPTO_SHA384_LIBC -- not found
                -- Checking support for ARCHIVE_CRYPTO_SHA512_LIBC
                -- Checking support for ARCHIVE_CRYPTO_SHA512_LIBC -- not found
                -- Checking support for ARCHIVE_CRYPTO_SHA256_LIBC2
                -- Checking support for ARCHIVE_CRYPTO_SHA256_LIBC2 -- not found
                -- Checking support for ARCHIVE_CRYPTO_SHA384_LIBC2
                -- Checking support for ARCHIVE_CRYPTO_SHA384_LIBC2 -- not found
                -- Checking support for ARCHIVE_CRYPTO_SHA512_LIBC2
                -- Checking support for ARCHIVE_CRYPTO_SHA512_LIBC2 -- not found
                -- Checking support for ARCHIVE_CRYPTO_SHA256_LIBC3
                -- Checking support for ARCHIVE_CRYPTO_SHA256_LIBC3 -- not found
                -- Checking support for ARCHIVE_CRYPTO_SHA384_LIBC3
                -- Checking support for ARCHIVE_CRYPTO_SHA384_LIBC3 -- not found
                -- Checking support for ARCHIVE_CRYPTO_SHA512_LIBC3
                -- Checking support for ARCHIVE_CRYPTO_SHA512_LIBC3 -- not found
                -- Checking support for ARCHIVE_CRYPTO_MD5_LIBSYSTEM
                -- Checking support for ARCHIVE_CRYPTO_MD5_LIBSYSTEM -- not found
                -- Checking support for ARCHIVE_CRYPTO_SHA1_LIBSYSTEM
                -- Checking support for ARCHIVE_CRYPTO_SHA1_LIBSYSTEM -- not found
                -- Checking support for ARCHIVE_CRYPTO_SHA256_LIBSYSTEM
                -- Checking support for ARCHIVE_CRYPTO_SHA256_LIBSYSTEM -- not found
                -- Checking support for ARCHIVE_CRYPTO_SHA384_LIBSYSTEM
                -- Checking support for ARCHIVE_CRYPTO_SHA384_LIBSYSTEM -- not found
                -- Checking support for ARCHIVE_CRYPTO_SHA512_LIBSYSTEM
                -- Checking support for ARCHIVE_CRYPTO_SHA512_LIBSYSTEM -- not found
                -- Checking support for ARCHIVE_CRYPTO_MD5_OPENSSL
                -- Checking support for ARCHIVE_CRYPTO_MD5_OPENSSL -- not found
                -- Checking support for ARCHIVE_CRYPTO_RMD160_OPENSSL
                -- Checking support for ARCHIVE_CRYPTO_RMD160_OPENSSL -- not found
                -- Checking support for ARCHIVE_CRYPTO_SHA1_OPENSSL
                -- Checking support for ARCHIVE_CRYPTO_SHA1_OPENSSL -- not found
                -- Checking support for ARCHIVE_CRYPTO_SHA256_OPENSSL
                -- Checking support for ARCHIVE_CRYPTO_SHA256_OPENSSL -- not found
                -- Checking support for ARCHIVE_CRYPTO_SHA384_OPENSSL
                -- Checking support for ARCHIVE_CRYPTO_SHA384_OPENSSL -- not found
                -- Checking support for ARCHIVE_CRYPTO_SHA512_OPENSSL
                -- Checking support for ARCHIVE_CRYPTO_SHA512_OPENSSL -- not found
                -- Checking support for ARCHIVE_CRYPTO_MD5_LIBMD
                -- Checking support for ARCHIVE_CRYPTO_MD5_LIBMD -- not found
                -- Checking support for ARCHIVE_CRYPTO_RMD160_LIBMD
                -- Checking support for ARCHIVE_CRYPTO_RMD160_LIBMD -- not found
                -- Checking support for ARCHIVE_CRYPTO_SHA1_LIBMD
                -- Checking support for ARCHIVE_CRYPTO_SHA1_LIBMD -- not found
                -- Checking support for ARCHIVE_CRYPTO_SHA256_LIBMD
                -- Checking support for ARCHIVE_CRYPTO_SHA256_LIBMD -- not found
                -- Checking support for ARCHIVE_CRYPTO_SHA512_LIBMD
                -- Checking support for ARCHIVE_CRYPTO_SHA512_LIBMD -- not found

                  iisola97 Okay, looks like libarchive is missing. There are two things we can try...

                  1. sudo apt-get remove openssl; sudo apt-get install openssl-dev=1.0.2
                    — OR —
                  2. sudo apt-get install libarchive

                  If the first does not work, you can leave the development copy, and proceed with trying (2).

                    justinquinn Some updates:

                    • I couldn't install openssl-dev=1.0.2 and libarchive. Both errors were: E: Unable to locate package openssl-dev/libarchive.
                    • I've installed openssl=1.0.2g-1ubuntu4.15. However, if I run openssl version in terminal, I get the following: OpenSSL 1.1.1 11 Sep 2018. Is this correct?

                    I was able to install sudo apt-get install libarchive-dev but I still got the same error while installing cmake:

                    Scanning dependencies of target cmlibarchive
                    [ 45%] Building C object Utilities/cmlibarchive/libarchive/CMakeFiles/cmlibarchive.dir/archive_acl.c.o
                    [ 46%] Building C object Utilities/cmlibarchive/libarchive/CMakeFiles/cmlibarchive.dir/archive_check_magic.c.o
                    [ 46%] Building C object Utilities/cmlibarchive/libarchive/CMakeFiles/cmlibarchive.dir/archive_cmdline.c.o
                    [ 46%] Building C object Utilities/cmlibarchive/libarchive/CMakeFiles/cmlibarchive.dir/archive_cryptor.c.o
                    In file included from /home/ignacio/research/mars/ISSM_source/trunk/externalpackages/cmake/install/Utilities/cmlibarchive/libarchive/archive_cryptor.c:32:0:
                    /home/ignacio/research/mars/ISSM_source/trunk/externalpackages/cmake/install/Utilities/cmlibarchive/libarchive/archive_cryptor_private.h:107:17: error: field ‘ctx’ has incomplete type
                    EVP_CIPHER_CTX ctx;
                    ................^
                    Utilities/cmlibarchive/libarchive/CMakeFiles/cmlibarchive.dir/build.make:134: recipe for target 'Utilities/cmlibarchive/libarchive/CMakeFiles/cmlibarchive.dir/archive_cryptor.c.o' failed
                    make[2]: *** [Utilities/cmlibarchive/libarchive/CMakeFiles/cmlibarchive.dir/archive_cryptor.c.o] Error 1
                    CMakeFiles/Makefile2:1728: recipe for target 'Utilities/cmlibarchive/libarchive/CMakeFiles/cmlibarchive.dir/all' failed
                    make[1]: *** [Utilities/cmlibarchive/libarchive/CMakeFiles/cmlibarchive.dir/all] Error 2
                    Makefile:160: recipe for target 'all' failed
                    make: *** [all] Error 2

                      iisola97 Yeah, we need to get the version of OpenSSL right. What does sudo apt-cache madison openssl yield? You’ll need to sudo apt-get remove openssl; sudo apt-get install openssl=VERSION, where VERSION is the version number closest to 1.0.2 that you can see when running sudo apt-cache madison openssl.

                      ignacio@mangala:~$ sudo apt-cache madison openssl
                      [sudo] password for ignacio:
                      openssl | 1.0.2g-1ubuntu4.15 | http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
                      openssl | 1.0.2g-1ubuntu4.15 | http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages
                      openssl | 1.0.2g-1ubuntu4 | http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages

                      I've tried installing both VERSION = 1.0.2g-1ubuntu4.15 and VERSION = 1.0.2g-1ubuntu4, and run cmake installation, but for both it gets stuck at the same instance with the same error.

                        justinquinn
                        ignacio@mangala:~$ openssl -v
                        Invalid command '-v'; type "help" for a list.

                        ignacio@mangala:~$ dpkg -l openssl
                        Desired=Unknown/Install/Remove/Purge/Hold
                        | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
                        |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
                        ||/ Name Version Architecture Description
                        +++-==============================================================-====================================-====================================-==================================================================================================================================
                        ii openssl 1.0.2g-1ubuntu4.15 amd64 Secure Sockets Layer toolkit - cryptographic utility

                        ignacio@mangala:~$ openssl version
                        OpenSSL 1.1.1 11 Sep 2018

                          iisola97 Oops: yep, openssl version. Okay, well it looks like, despite setting the version, you still have v1.1.1. What does which openssl give? cd to that directory, then ls -la openssl*. What do you get?

                            justinquinn
                            ignacio@mangala:~$ which openssl
                            /usr/local/bin/openssl
                            ignacio@mangala:~$ cd /usr/local/bin/
                            ignacio@mangala:/usr/local/bin$ ls -la openssl*
                            -rwxr-xr-x 1 root root 756792 Jun 26 11:03 openssl