netselect icon indicating copy to clipboard operation
netselect copied to clipboard

netselect-apt not working

Open ablonewolf opened this issue 4 years ago • 5 comments
trafficstars

Suddenly, in my MX-Linux 19.4, netselect-apt is not working properly. This is what I type in the terminal. sudo netselect-apt And the output I get is given below. `Using distribution stable. Retrieving the list of mirrors from www.debian.org...

URL transformed to HTTPS due to an HSTS policy --2021-06-07 10:00:38-- https://www.debian.org/mirror/mirrors_full Resolving www.debian.org (www.debian.org)... 149.20.4.15, 128.31.0.62, 130.89.148.77, ... Connecting to www.debian.org (www.debian.org)|149.20.4.15|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 129505 (126K) [text/html] Saving to: ‘/tmp/netselect-apt.LNOZdD’

/tmp/netselect-apt.LNOZdD 100%[=======================================================================================================>] 126.47K 172KB/s in 0.7s

2021-06-07 10:00:40 (172 KB/s) - ‘/tmp/netselect-apt.LNOZdD’ saved [129505/129505]

Choosing a main Debian mirror using netselect. netselect-apt was unable to obtain a list of valid hosts from the file downloaded from the url 'http://www.debian.org/mirror/mirrors_full'. This might happen because of any of the following reasons:

  • there was an error in the file
  • the file is not in the format netselect-apt expected
  • there is a bug in netselect-apt Please manually check the file. If you believe its contents are correct, file a bug (hint: use 'reportbug') against netselect-apt and provide the file as well as the output generated by the program (hint: use 'script'). ` I am unable to find out why is this happening. Anyone knows why?

ablonewolf avatar Jun 07 '21 04:06 ablonewolf

This issue was fixed in Debian by modifying a line in the Perl script in the function run_netselect.

$ diff -wu netselect-apt which netselect-apt --- netselect-apt 2021-08-14 08:10:21.211144475 +0530 +++ /usr/bin/netselect-apt 2016-06-15 05:49:23.000000000 +0530 @@ -184,7 +184,7 @@ next if $_ !~ /Site:/; if( ( /Includes architectures:.+'"$arch"'.+/i || $_ !~ /Includes architectures:/ ) &&

  •                                           m@'"$SEARCH"':.*<a.*?href="('"$PROTO"'://.*?)">@i && $my_country == 1
    
  •                                           m@<br>'"$SEARCH"':.*<a.*?href="('"$PROTO"'://.*?)">@i && $my_country == 1
                                      ){
                                      print("$1\n");
                              }}')
    

netselect-apt.txt

DhimanAbhimanyu avatar Aug 14 '21 02:08 DhimanAbhimanyu

Will you please note that in detail about how to solve the issue I addressed? Unfortunately, I cannot make out about your instructions.

ablonewolf avatar Aug 14 '21 09:08 ablonewolf

Oh yes, thank you. I got what you meant. Thanks for providing the text file. Means a lot.

ablonewolf avatar Aug 14 '21 10:08 ablonewolf

@ArkaBhuiyan did you also try with my fork i made a long time ago?

TriMoon avatar Aug 14 '21 21:08 TriMoon

No, I just saw it for the first time.

ablonewolf avatar Aug 18 '21 12:08 ablonewolf