wget https://github.com/sdrausty/TermuxArch/blob/master/setupTermuxArch.md5 produces strange output. This is with the latest version of wget. The previous version, 1.19.2 works well. This causes https://sdrausty.github.io/TermuxArch/ to fail.
How to solve this error?
I'm getting this problem on fresh Termux installation with wget 1.19.3 but this problem exists even on desktop linux installation (ArchLinux, x86_64).
Wget corrupts file content:
~/testing2 ➤ LANG=en_US.UTF-8 wget https://raw.githubusercontent.com/sdrausty/TermuxArch/master/setupTermuxArch.md5
--2018-01-22 00:41:14-- https://raw.githubusercontent.com/sdrausty/TermuxArch/master/setupTermuxArch.md5
Loaded CA certificate '/etc/ssl/certs/ca-certificates.crt'
Resolving raw.githubusercontent.com... 151.101.0.133, 151.101.192.133, 151.101.128.133, ...
Connecting to raw.githubusercontent.com|151.101.0.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 77 [text/plain]
Saving to: ‘setupTermuxArch.md5’
setupTermuxArch.md5 100%[=======================================================================>] 77 --.-KB/s in 0s
2018-01-22 00:41:15 (59.3 MB/s) - ‘setupTermuxArch.md5’ saved [77/77]
~/testing2 ➤ cat setupTermuxArch.md5
�03H67H3K6J107L63I61HK4�062I140HSP(N-)I-�-�p,J��+I,�K���r�n9
While curl downloads this file without any problems:
~/testing2 ➤ curl https://raw.githubusercontent.com/sdrausty/TermuxArch/master/setupTermuxArch.md5
860c70f6c2d071c64c40fa08324d100f setupTermuxArch.tar.gz
I have found that file is not getting corrupted, but gzipped 😃.
bash-4.4$ cat setupTermuxArch.md5
�L�465K117O5�4ML3��HK31��LN13L41TP(N-)I-�-�p,J��+I,�K���᧹9
bash-4.4$ cat setupTermuxArch.md5 | gzip -d
9d9356d477e795af698ff4189cd61a41 setupTermuxArch.tar.gz
this problem exists only in certain cases.
@staymetal and I were ripping our heads apart over this yesterday at https://gitter.im/termux/termux
this problem exists only in certain cases
Out of three different armv7 device tests yesterday, installation on two devices were successful.
All armv8 device installs were successful.
These results were because some of the devices have wget v1.19.2 installed. The single device that is failing has wget v1.19.3 installed.
Wget 1.19.3 works without error if additional flag passed:
wget --compression=none -qO- https://raw.githubusercontent.com/sdrausty/TermuxArch/master/setupTermuxArch.md5
860c70f6c2d071c64c40fa08324d100f setupTermuxArch.tar.gz
It seems that gzip decompression sometimes does not work.
A solution is to downgrade wget in Termux. Use apt remove wget to downgrade your wget to https://sdrausty.github.io/TermuxArch/scripts/files/wget_1.19.2-1_aarch64.deb this version. dpkg --install wget_1.19.2-1_aarch64.deb is a resolution for aarch64/armv8 users for the time being.
Wget 1.19.3 works without error if additional flag passed:
It plays a melody through the vibrator https://github.com/sdrausty/TermuxArch/commit/ab020609020058e1dbdcbde4befdcb0ae02fd1c0 with these additional arguments.
wget -q -N --show-progress https://raw.githubusercontent.com/sdrausty/TermuxArch/master/setupTermuxArch.md5
wget -q -N --show-progress --compression=none -qO- https://raw.githubusercontent.com/sdrausty/TermuxArch/master/setupTermuxArch.md5
https://github.com/sdrausty/TermuxArch/issues/35#issuecomment-359298332 For armv7 users:
https://sdrausty.github.io/TermuxArch/scripts/files/wget_1.19.2_arm.deb https://sdrausty.github.io/TermuxArch/scripts/files/libuuid_1.0.3-1_arm.deb
https://sdrausty.github.io/TermuxArch/scripts/files/libunistring_0.9.7_arm.deb
https://sdrausty.github.io/TermuxArch/scripts/files/pcre_8.41-1_arm.deb
Use apt remove wget libunistring followed by dpkg --install libunistring_0.9.7_arm.deb wget_1.19.2_arm.deb as a temporary solution to this topic.
@xeffyr
not getting corrupted, but gzipped
This file being corrupted through gzipping.
@xeffyr What even in Linux when I a file from your s7 kernel from GitHub through wget it messed text inside file , I recommend to only use wget in downloading binaries and zips! And curl is better for text files!
Downgrading wget according to instructions has just closed https://github.com/sdrausty/TermuxArch/issues/35 It seems both wget_1.19.13 and libunistring_0.9.7_arm are affected.
https://github.com/sdrausty/TermuxArch/issues/32#issuecomment-359306018 wget might be producing other maladies as well with version 1.19.3.
Automatic x86_64 download from evowise no longer works https://github.com/sdrausty/TermuxArch/issues/32
How to solve this error? https://github.com/sdrausty/TermuxArch/issues/35
Latestwget1.19.3 produces errors https://github.com/termux/termux-packages/issues/2052
All three(3) of these may be related, including this topic.
All three(3) of these may be related, including this topic to wget 1.19.3 and libunistring.
if [ $(getprop ro.product.cpu.abi) = x86_64 ];then
wget -A tar.gz -m -nd -np http://$mirror$path
whats happening is that its downloading a gzipped stream and not decompressing.
wget a file rename it to file.gz
gunzip file.gz
--without-zlib makes it work but ... without zlib obviously. zlib is in ndk not our library.
http://git.savannah.gnu.org/cgit/wget.git/patch/?id=047746eb765d212cbf05afac16f4bd73257d8186
revert that and it works ...
@its-pointless thank you for your comments.
```setupTermuxArch.tar.gz 100%[==========================>] 6.87K --.-KB/s in 0.05s
wget: unrecognized option '--without-zlib'
Usage: wget [OPTION]... [URL]..
Try `wget --help' for more options.
[23:49 t ]$ wget --version
GNU Wget 1.19.2 built on linux-androideabi.
```
Automatic x86_64 download from evowise no longer works https://github.com/sdrausty/TermuxArch/issues/32
is concerning as well. Which upstream wget do we use in Termux?
wget -q -N --show-progress https://raw.githubusercontent.com/sdrausty/TermuxArch/master$flag/setupTermuxArch.md5 |xargs gunzip
setupTermuxArch.tar.gz 100%[==========================>] 6.87K --.-KB/s in 0.06s
setupTermuxArch.md5 100%[==========================>] 77 --.-KB/s in 0s
gunzip: invalid magic
recommend to only use wget in downloading binaries and zips! And curl is better for text files
Thank you for your comment @SamSanuch wget version 1.19.2 is good at both. Version 1.19.3 is obviously not too good a both types of downloads.
@its-pointless
http://git.savannah.gnu.org/cgit/wget.git/patch/?id=047746eb765d212cbf05afac16f4bd73257d8186
revert that and it works ...
Sounds very promising. Thank you for this information.
Thanks - this has been fixed in the updated version 1.19.4 of wget which is now available as an update!
@fornwall Thank you for the quick update!
$ wget --version
GNU Wget 1.19.4 built on linux-androideabi.
Works as expected.
Most helpful comment
Wget 1.19.3 works without error if additional flag passed:
It seems that gzip decompression sometimes does not work.