LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   speedtest-cli (https://www.linuxquestions.org/questions/linux-newbie-8/speedtest-cli-4175528592/)

T-Dub116 12-17-2014 03:45 PM

speedtest-cli
 
Trying to run speed test on system, I install successfully and ran on my Red Hat Enterprise Linux Server release 5.8 (Tikanga)


But I am not able to get it to run on my
Red Hat Enterprise Linux ES release 4 (Nahant Update 8)

Getting Error:

# ./speedtest-cli --share
Retrieving speedtest.net configuration...
Traceback (most recent call last):
File "./speedtest-cli", line 692, in ?
main()
File "./speedtest-cli", line 686, in main
speedtest()
File "./speedtest-cli", line 509, in speedtest
config = getConfig()
File "./speedtest-cli", line 314, in getConfig
if int(uh.code) != 200:
AttributeError: addinfourl instance has no attribute 'code'


***********************
This is how I installed
***********************

tegw -O speedtest-cli --no-check-certificate https://raw.github.com/sivel/speedte...eedtest_cli.py

chmod +x speedtest-cli

./speedtest-cli

./speedtest-cli --simple
./speedtest-cli --version
./speedtest-cli --share

suicidaleggroll 12-17-2014 03:57 PM

Looks like the version of python on your RHEL 4 machine isn't new enough to support the syntax being used in that code.

You have two choices:
1) Modify the code so it works correctly on your version of python
2) Install a newer version of python (SEE NOTE BELOW)

Note: Since python is integral to the functionality of yum, DO NOT replace the built-in version! You can download a newer release and use it from an alternate directory, but DO NOT "make install" and toss it into the default system directory, or you'll be in for a world of hurt.

John VV 12-17-2014 05:27 PM

i take it you are NOT aware that 4.8 is NOT!!! supported by redhat

when 4 was given the reprieve from the executioner's block ( the move from 7 to 10 year support)
ONLY!!!
Only 4.9 is still supported on the EXTRA extended life-support


to run on 4.8
-- upgrade to 5.11 or 6.6 or 7.0

or
pay redhat a ton of cash for the 4.9 backport CRITICAL security updates
( that should not be a problem, seeing as you are already doing that to keep 5 at 5.8 and NOT the current 5.11)

then

install a second version of a newer version of python

as above

IF ( and this is a big IF )
if your version of 4 had the backport of yum installed then THAT version of python MUST!!! be used

but
you can install a second version in a "side by side" set up


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