Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

netselect-apt not working #6

Open
ablonewolf opened this issue Jun 7, 2021 · 5 comments
Open

netselect-apt not working #6

ablonewolf opened this issue Jun 7, 2021 · 5 comments

Comments

@ablonewolf
Copy link

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?
@DhimanAbhimanyu
Copy link

DhimanAbhimanyu commented Aug 14, 2021

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

@ablonewolf
Copy link
Author

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

@ablonewolf
Copy link
Author

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

@TriMoon
Copy link

TriMoon commented Aug 14, 2021

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

@ablonewolf
Copy link
Author

No, I just saw it for the first time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants