LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Ruario's latest-firefox error (https://www.linuxquestions.org/questions/slackware-14/ruarios-latest-firefox-error-4175557768/)

esteeven 11-02-2015 06:17 AM

Ruario's latest-firefox error
 
I have been a happy user of Ruario's excellent latest-firefox and chrome scripts for a while. Thanks for them.

I have hit an issue that I don't understand on a new install of 14.1 64bit.

The error is as follows:

Quote:

./latest-firefox: line 73: [: 41.0.1: binary operator expected
./latest-firefox: line 162: [: firefox-41.0.1: binary operator expected
--2015-11-02 12:06:44-- http://ftp.mozilla.org/pub/mozilla.o...eleases/41.0.1
Resolving ftp.mozilla.org (ftp.mozilla.org)... 54.230.196.206
Connecting to ftp.mozilla.org (ftp.mozilla.org)|54.230.196.206|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2015-11-02 12:06:45 ERROR 404: Not Found.

--2015-11-02 12:06:45-- http://41.0.2/linux-x86_64/en-US/firefox-41.0.1
Resolving 41.0.2 (41.0.2)... 41.0.0.2
Connecting to 41.0.2 (41.0.2)|41.0.0.2|:80... failed: Connection timed out.
Retrying.

--2015-11-02 12:08:53-- (try: 2) http://41.0.2/linux-x86_64/en-US/firefox-41.0.1
Connecting to 41.0.2 (41.0.2)|41.0.0.2|:80...
I don't understand. Can anybody point me in the right direction?

Thanks

glorsplitz 11-02-2015 06:53 AM

go here
 
check this out HERE they say how to fix it, ftp.mozilla.org shows that two versions of Firefox are available

esteeven 11-02-2015 07:12 AM

Brilliant. That worked. Many thanks.

lems 11-02-2015 10:43 AM

One can also run it like this:
Code:

VERSION=41.0.2 latest-firefox
which might not be as convenient, though.

ruario 11-23-2015 07:40 AM

Hmm... I missed this at the time. I have not been using Firefox much for the last few months so did not encounter the problem myself. Anyway, it seems the issue went away and then another appeared.

Mozilla have changed their download options. They used to have "latest" symlinks on their ftp server pointing to the most recent version for a given OS and locale. Now they suggest you using a GET request to download.mozilla.org to find your required version, e.g. to find the latest 64Bit Linux version you access download.mozilla.org/?product=firefox-latest&os=linux64&lang=en-US.

They may have done this to avoid issues like the one that spawned this thread, where two versions are found in the same latest folder. Whatever the reason, this new change was also discussed (and worked around) in this thread.

Anyway, I just wanted people (copied only on this thread) to know that I have updated my latest-firefox gist to use a GET request to download.mozilla.org work out the version. If you still have an old version, download a new one from there.

esteeven 11-23-2015 08:06 AM

Excellent. Many thanks ruario.

aszabo 11-23-2015 01:24 PM

Ruario, I have downloaded your last script but it seems not to work, the error message is:
Could not work out the latest version; exiting

ruario 11-23-2015 01:28 PM

Are you sure you are running the latest version. Check it out like so and run it verbosely, so that you get some idea of how far it got and what the problem is:

Code:

git clone https://gist.github.com/9672798.git
bash -x 9672798/latest-firefox

P.S. You could also check the version you have locally. It should be 1.3.5, Check like so:

Code:

grep 'latest-firefox Version' latest-firefox

aszabo 11-23-2015 01:58 PM

Yes, the version is really 1.3.5.

ruario 11-23-2015 02:10 PM

what does this return

Code:

wget --spider --max-redirect 0 'https://download.mozilla.org/?product=firefox-latest&os=linux64&lang=en-US'

aszabo 11-23-2015 02:30 PM

root@ibm:~# wget --spider --max-redirect 0 'https://download.mozilla.org/?product=firefox-latest&os=linux64&lang=en-US'
Spider mode enabled. Check if remote file exists.
--2015-11-23 21:28:56-- https://download.mozilla.org/?produc...x64&lang=en-US
Resolving download.mozilla.org (download.mozilla.org)... 52.22.193.206
Connecting to download.mozilla.org (download.mozilla.org)|52.22.193.206|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://download.cdn.mozilla.net/pub/...x-42.0.tar.bz2 [following]
0 redirections exceeded.


But I don't use x86_64.

ruario 11-23-2015 02:39 PM

Ok. I want to check two different things.

Firstly, what does this return if run from the terminal where you have been running this script?

Code:

echo $VERSION
If addition, please confirm that what this returns:

Code:

wget --spider --max-redirect 0 'https://download.mozilla.org/?product=firefox-latest&os=linux&lang=en-US' 2>&1 | sed -n '/^Location: /s|.*/firefox-\(.*\)\.tar.*|\1|p'

aszabo 11-23-2015 02:42 PM

Quote:

Originally Posted by ruario (Post 5454145)
Ok. I want to check two different things.

Firstly, what does this return if run from the terminal where you have been running this script?

Code:

echo $VERSION
If addition, please confirm that what this returns:

Code:

wget --spider --max-redirect 0 'https://download.mozilla.org/?product=firefox-latest&os=linux&lang=en-US' 2>&1 | sed -n '/^Location: /s|.*/firefox-\(.*\)\.tar.*|\1|p'

echo $VERSION => returns nothing
wget --spider --max-redirect 0 'https://download.mozilla.org/?product=firefox-latest&os=linux&lang=en-US' 2>&1 | sed -n '/^Location: /s|.*/firefox-\(.*\)\.tar.*|\1|p'

returns nothing

ruario 11-23-2015 03:25 PM

ok, then how about just this:

Code:

wget --spider --max-redirect 0 'https://download.mozilla.org/?product=firefox-latest&os=linux&lang=en-US'

aszabo 11-23-2015 03:33 PM

root@ibm:~# wget --spider --max-redirect 0 'https://download.mozilla.org/?product=firefox-latest&os=linux&lang=en-US'
Spider mode enabled. Check if remote file exists.
--2015-11-23 22:33:09-- https://download.mozilla.org/?produc...nux&lang=en-US
Resolving download.mozilla.org (download.mozilla.org)... 54.86.158.87
Connecting to download.mozilla.org (download.mozilla.org)|54.86.158.87|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://download.cdn.mozilla.net/pub/...x-42.0.tar.bz2 [following]
0 redirections exceeded.

returns nothing


All times are GMT -5. The time now is 05:15 PM.