Problem description
wget fails due to "Disabling SSL due to encountered errors." when provided with an HTTPS URL.
Steps to reproduce
From fresh install of Termux:
$ apt update && apt upgrade -y
# ...
$ apt install -y wget
# ...
$ hash -r
$ wget https://google.com
--2019-03-03 12:13:59-- https://google.com/
Disabling SSL due to encountered errors.
$
Expected behavior
Download the provided HTTPS URL.
Additional information
Updatable packages:
All packages up to date
System information:
Linux localhost 4.4.154-MCK-O-v2.0.1 #1 SMP PREEMPT Tue Oct 23 19:12:22 CEST 2018 aarch64 Android
Termux-packages arch:
aarch64
Android version:
8.0.0
Device manufacturer:
samsung
Device model:
SM-A530F
I have the same problem, a few hours ago it works without problem, uninstall termux, and reinstall it, when installing wget I got that error
I have the same problem,so I can only use curl instead of wget now.
Just make sure that ALL packages are upgraded. Https is working after update:
[~]:$ wget https://google.com
--2019-03-03 11:57:06-- https://google.com/
Resolving google.com... 173.194.122.168, 173.194.122.169, 173.194.122.174, ...
Connecting to google.com|173.194.122.168|:443... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://www.google.com/ [following]
--2019-03-03 11:57:06-- https://www.google.com/
Resolving www.google.com... 216.58.215.68
Connecting to www.google.com|216.58.215.68|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ‘index.html.1’
index.html.1 [ <=> ] 13.62K --.-KB/s in 0.005s
2019-03-03 11:57:06 (2.79 MB/s) - ‘index.html.1’ saved [13949]
System info:
[~]:$ termux-info
Updatable packages:
All packages up to date
System information:
Linux localhost 3.18.91-14843133-QB21796491 #1 SMP PREEMPT Tue Jan 29 17:47:30 KST 2019 aarch64 Android
Termux-packages arch:
aarch64
Android version:
8.0.0
Device manufacturer:
samsung
Device model:
SM-G930F
apt update && apt upgrade -y
@bakaika Haven't tried apt full-upgrade ?
No luck :(
Interesting, I somehow got
Package: wget
Version: 1.20.1-2
Status: install ok installed
Maintainer: Fredrik Fornwall @fornwall
Installed-Size: 467 kB
Depends: pcre2, openssl, libuuid, libandroid-support, libunistring
Homepage: https://www.gnu.org/software/wget/
Download-Size: unknown
APT-Manual-Installed: yes
APT-Sources: /data/data/com.termux/files/usr/var/lib/dpkg/status
Description: Commandline tool for retrieving files using HTTP, HTTPS and FTP
But in main repository only http://termux.net/dists/stable/main/binary-aarch64/wget_1.20.1-1_aarch64.deb (wget 1.20.1-1).
Reinstalled wget with version available on termux.net, still same - working:
[~]:$ wget http://termux.net/dists/stable/main/binary-aarch64/wget_1.20.1-1_aarch64.deb
--2019-03-03 12:11:29-- http://termux.net/dists/stable/main/binary-aarch64/wget_1.20.1-1_aarch64.deb
Resolving termux.net... 104.18.36.234, 104.18.37.234
Connecting to termux.net|104.18.36.234|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 193508 (189K) [application/octet-stream]
Saving to: ‘wget_1.20.1-1_aarch64.deb’
wget_1.20.1-1_aarch64.deb 100%[===================================================================>] 188.97K --.-KB/s in 0.04s
2019-03-03 12:11:29 (4.52 MB/s) - ‘wget_1.20.1-1_aarch64.deb’ saved [193508/193508]
[~]:$ dpkg -i wget_1.20.1-1_aarch64.deb
(Reading database ... 29772 files and directories currently installed.)
Preparing to unpack wget_1.20.1-1_aarch64.deb ...
Unpacking wget (1.20.1-1) over (1.20.1-1) ...
Setting up wget (1.20.1-1) ...
Processing triggers for man (1.14.4) ...
[~]:$ wget https://google.com
--2019-03-03 12:11:42-- https://google.com/
Resolving google.com... 172.217.16.14
Connecting to google.com|172.217.16.14|:443... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://www.google.com/ [following]
--2019-03-03 12:11:42-- https://www.google.com/
Resolving www.google.com... 172.217.16.36
Connecting to www.google.com|172.217.16.36|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ‘index.html.3’
index.html.3 [ <=> ] 13.60K --.-KB/s in 0.004s
2019-03-03 12:11:42 (3.38 MB/s) - ‘index.html.3’ saved [13922]
@bakaika What wget --debug https://google.com says ?
@bakaika Looks like I found a problem. On all my devices I have installed package openssl-tool and wget works.
If I uninstall openssl-tool, then I get same error as you.
openat(AT_FDCWD, "/data/data/com.termux/files/usr/etc/tls/openssl.cnf", O_RDONLY) = -1 ENOENT (No such file or directory)
I just installed openssl-tool, it works for me now too...
Seems just like missing /data/data/com.termux/files/usr/etc/tls/openssl.cnf. This file is in openssl-tool.
Indeed, wonder what change has made it all break though...
Indeed, wonder what change has made it all break though...
OpenSSL update. Previously it seems that openssl.cnf was required only for utility but not for library.
Ah, so.. wget should have openssl-tools as a required dep now?
No, openssl.cnf should be moved to openssl package from the openssl-tool.
Ah nice.
after installing openssl-tool wget works again for me, thank you very much :)
ii wget 1.20.1-1 aarch64
wget https://google.com
wget: not an http or ftp url: https://google.com
Most helpful comment
OpenSSL update. Previously it seems that openssl.cnf was required only for utility but not for library.