Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Mirrorselect is not working
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
fishnet37222
n00b
n00b


Joined: 23 Oct 2011
Posts: 55

PostPosted: Mon Dec 20, 2021 9:31 pm    Post subject: Mirrorselect is not working Reply with quote

I'm installing Gentoo on a new system and I was trying to use "mirrorselect" when I got the error shown below. I booted my system off a USB stick created using "install-amd64-minimal-20211219T170551Z.iso".

Code:
livecd /mnt/gentoo # mirrorselect
Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.9/mirrorselect", line 58, in <module>
    from mirrorselect.main import MirrorSelect
  File "/usr/lib/python3.9/site-packages/mirrorselect/main.py", line 43, in <module>
    from mirrorselect.extractor import Extractor
  File "/usr/lib/python3.9/site-packages/mirrorselect/extractor.py", line 33, in <module>
    from sslfetch.connections import Connector
  File "/usr/lib/python3.9/site-packages/sslfetch/connections.py", line 40, in <module>
    import requests
  File "/usr/lib/python3.9/site-packages/requests/__init__.py", line 133, in <module>
    from . import utils
  File "/usr/lib/python3.9/site-packages/requests/utils.py", line 26, in <module>
    from . import certs
  File "/usr/lib/python3.9/site-packages/requests/certs.py", line 15, in <module>
    from certifi import where
  File "/usr/lib/python3.9/site-packages/certifi/__init__.py", line 1, in <module>
    from .core import contents, where
  File "/usr/lib/python3.9/site-packages/certifi/core.py", line 3, in <module>
    from certifi._patch import _verify_dist_info
  File "/usr/lib/python3.9/site-packages/certifi/_patch.py", line 4, in <module>
    import pkg_resources
ModuleNotFoundError: No module named 'pkg_resources'


I was able to proceed by going to the mirrors page on the web-site and copying the address and pasting it into "/etc/portage/make.conf" as the Handbook instructs, but using "mirrorselect" is more convenient and less error-prone.
_________________
Dave
Back to top
View user's profile Send private message
halcon
l33t
l33t


Joined: 15 Dec 2019
Posts: 629

PostPosted: Mon Dec 20, 2021 11:03 pm    Post subject: Reply with quote

Hi fishnet37222,

The missing module is being installed by the package setuptools. It would be useful to see the output of
Code:
equery f dev-python/setuptools
(in the cd environment)

Also, which minimal cd are you using? Please provide the arch/date and the output of
Code:
sha512sum install-<arch>-minimal-<date>.iso

_________________
A wife asks her husband, a programmer:
- Could you please go shopping for me and buy one carton of milk, and if they have eggs, get 6?
He comes back with 6 cartons of milk.
- Why did you buy 6 cartons of milk?
- They had eggs.
Back to top
View user's profile Send private message
fishnet37222
n00b
n00b


Joined: 23 Oct 2011
Posts: 55

PostPosted: Mon Dec 20, 2021 11:15 pm    Post subject: Reply with quote

I included the filename of the ISO file in my initial post, but it's "install-amd64-minimal-20211219T170551Z.iso".

I tried running the "equery" command after booting to the ISO, but got an error that the command could not be found.

Here's the output of the "sha512sum" command:

Code:
c15b3100da2cdc7be106824d5ca3268700b1e7125ca2a09a17139cc27535a23099cf39997ae0e1e3431affea0b1f7811d9b502dc26fd9c85d452e011206e537b  install-amd64-minimal-20211219T170551Z.iso

_________________
Dave
Back to top
View user's profile Send private message
Ionen
Developer
Developer


Joined: 06 Dec 2018
Posts: 2727

PostPosted: Mon Dec 20, 2021 11:42 pm    Post subject: Reply with quote

Dependencies on setuptools are becoming more precise allowing to remove it on minimal systems (which I guess the livecd did), but this also reveals that the dependency is missing on some packages, mirrorselect seems to be one of them (Edit: or looking at the error, probably certifi does)

That aside, I tend to feel the default GENTOO_MIRRORS (used if left unset) does a nice job even if it won't always give the fastest for you.
Code:
# Default distfiles mirrors. This rotation has multiple hosts and is reliable.
# Approved by the mirror-admin team.
GENTOO_MIRRORS="http://distfiles.gentoo.org"
Notably nice to avoid a case where a mirror died and requires updating make.conf.

Can worry about that later either way, skipping mirrorselect won't prevent installing gentoo.
Back to top
View user's profile Send private message
halcon
l33t
l33t


Joined: 15 Dec 2019
Posts: 629

PostPosted: Tue Dec 21, 2021 12:20 pm    Post subject: Reply with quote

fishnet37222 wrote:
I included the filename of the ISO file in my initial post, but it's "install-amd64-minimal-20211219T170551Z.iso".

Indeed. I didn't notice it. Sorry.

fishnet37222 wrote:
I tried running the "equery" command after booting to the ISO, but got an error that the command could not be found.

So, gentoolkit is not included in the minimal cd either... What happens if you just try to install setuptools?

fishnet37222 wrote:
Here's the output of the "sha512sum" command:

Code:
c15b3100da2cdc7be106824d5ca3268700b1e7125ca2a09a17139cc27535a23099cf39997ae0e1e3431affea0b1f7811d9b502dc26fd9c85d452e011206e537b  install-amd64-minimal-20211219T170551Z.iso

The same hash is indicated in the corresponding DIGESTS file, so, the iso is not corrupted.
_________________
A wife asks her husband, a programmer:
- Could you please go shopping for me and buy one carton of milk, and if they have eggs, get 6?
He comes back with 6 cartons of milk.
- Why did you buy 6 cartons of milk?
- They had eggs.
Back to top
View user's profile Send private message
Spooghetti420
n00b
n00b


Joined: 27 Dec 2021
Posts: 1

PostPosted: Mon Dec 27, 2021 5:15 pm    Post subject: A fix that might work Reply with quote

I don't know whether you've already fixed your problem, but I was having the same issue and I found a really easy fix. As others have pointed out, the 'setuptools' module appears to not be present on the minimal CD these days, so you can't even run mirrorselect by default. But, if you just run:
Code:
python -m ensurepip --upgrade
, that appears to install setuptools automatically. At least, it did for me, and once I had done so, mirrorselect was working just fine :)
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 21706

PostPosted: Mon Dec 27, 2021 6:26 pm    Post subject: Reply with quote

Did you run that in the LiveCD environment or in the chroot?
Back to top
View user's profile Send private message
djones9960
n00b
n00b


Joined: 28 Dec 2021
Posts: 1
Location: Wolverhampton

PostPosted: Tue Dec 28, 2021 3:17 pm    Post subject: It works Reply with quote

Hu wrote:
Did you run that in the LiveCD environment or in the chroot?


I'm doing the same thing in a virtualbox machine now. It works from a LiveCD. It moans about being run as root but it works and you can run mirrorselect.

EDIT: 'python -m ensurepip --upgrade' works, just to be clear. :)
Back to top
View user's profile Send private message
sam_
Developer
Developer


Joined: 14 Aug 2020
Posts: 1685

PostPosted: Tue Dec 28, 2021 9:42 pm    Post subject: Reply with quote

This was reported in bug 822777 and is already fixed in tree. It should be fixed in the next round of livecd and such to be generated/built (usually happens weekly, I think the new ones should already be out).

As a workaround: emerge mirrorselect inside the chroot after emerge --syncing.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum