I am trying to download latest version of graphicsmagick from Sourceforge in my bash script
wget -q https://sourceforge.net/projects/graphicsmagick/files/latest/download?source=files -O GraphicsMagick-LATEST.tar.gz
tar -xzvf GraphicsMagick-LATEST.tar.gz
The problem is that when I try to extract the tar.gz I get the following error
gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now
This means that the script is not downloading the latest tar.gz but rather another filetype?
Why is that happening and what I am missing here?
You are forcing the file to be renamed as a tar.gz extension. But the file is in a different format. In fact, when you download directly the link, the file is not a gz file, but a rpm file.
You need to download directly the file you want:
But here, you are predefining the version of the file you want to download.