Could not find the repository on the selected mirror

Started by mihak, February 03, 2021, 06:04:51 PM

Previous topic - Next topic
My OPNSense update doesn't want to connect to repos anymore.
One thing I changed: I temporarily enabled FreeBSD repo in order to install mosh server. Then I disabled FreeBSD repo again.
Yet, as I installed mosh, my pkg was upgraded too:

Checking packages: ..................................................
pkg-1.16.2 repository mismatch: FreeBSD
pkg-1.16.2 version mismatch, expected 1.15.10_2
Checking packages: .................. done


How can I bring pkg and repos back into OPNSense alignment?

sudo pkg install -r OPNsense -f pkg

And everything is back to normal. Closing the issue. :-)

Better stay away from the FreeBSD repo... pkg likes to upgrade what it can.

Unfortunately pkg in FreeBSD has a feature that kills services on reload so their package does not work for us at all.


Cheers,
Franco

Quote from: franco on February 05, 2021, 01:58:26 PM
Better stay away from the FreeBSD repo... pkg likes to upgrade what it can.

Unfortunately pkg in FreeBSD has a feature that kills services on reload so their package does not work for us at all.


i'm getting the same "Could not find the repository on the selected mirror" error but i haven't messed with the repos.  is the "sudo pkg install -r OPNsense -f pkg" fix mentioned above still a recommended fix?

Well, do you have pkg 1.6.2 installed? oO


Cheers,
Franco

Quote from: franco on February 08, 2021, 08:54:13 PM
Well, do you have pkg 1.6.2 installed? oO


According to System:Firmware:Packages ->

pkg   1.15.10_2
pkgconf   1.7.3,1

I have exactly the same problem and the same versions:

pkg   1.15.10_2
pkgconf   1.7.3,1

The problem started, as far as I can tell, after the update to 21.1.1.

People seem to have this error now which is suspicious timing. One user found out there is a stale /usr/local/etc/repos/SunnyValley.conf in their systems pointing to a release before 20.7 on their end. Maybe that mirror directory got deleted because no longer supported but installing multiple repositories is never easy so that's that... Try to delete that config file.

FWIW, the recent updates *do not* cause this. Our repos are fine.


Cheers,
Franco

You're right Franco. I checked again and I found that that problem was related to the ntopng repository I installed. I removed it and installed again and now everything is working.

Thanks a lot.

Riccardo

Hi Riccardo,

Aha, not sure what is going on at NTOP repo as well.

For such cases I am working on a connectivity audit for the firmware page to be able to pinpoint these issues better. I have no ETA but it will likely be available with 21.7 if not sooner.


Cheers,
Franco

Quote from: franco on February 09, 2021, 07:56:51 PM
One user found out there is a stale /usr/local/etc/repos/SunnyValley.conf in their systems...Try to delete that config file.

Removing:
/usr/local/etc/pkg/repos/SunnyValley.conf
Solved this issue for me.

thanks very much!

Quote from: sed on February 10, 2021, 08:13:34 AM
Removing:
/usr/local/etc/pkg/repos/SunnyValley.conf
Solved this issue for me.

thanks very much!

this worked for me as well.

Ok, I had this same problem with it not finding the repository. I hadn't added or enabled any other repos. My install is fairly stock with a few additional add-ons. Poking around from clues of people saying to remove repos from /usr/local/etc/pkg/repos, I found that i had to copy the FreeBSD.conf.sample to FreeBSD.conf to make it live to disable the FreeBSD repo. This seems to work. My OPNSense has found the 21.1.4 update now and is in progress of updating. I had never done anything to specifically enable this FreeBSD repo that I know of. I had to go in specifically to disable it.

Again, not sure what caused it to break. Seemed to do it after 21.1 update, but I won't blame anyone. Just sharing my experience if it will help anyone else.

FWIW, since 21.1.3 you can quickly check the enabled repositories from the System: Firmware: Status page.


Cheers,
Franco

Hi - could you tell me the exact command how to delete that config file? I have exact the same error message on two of our client Firewalls. Thank you.