Problem with main repository

Hello Haiku community!
This this is my first post here, so please allow me a short introduction.
I had a long interest on the operating system, and it’s time to give it a serious try. I’m mostly a developer, interested to port my libraries in Haiku, and include Haiku in the list of the operating systems my software is known to work. From what I see in the repositories most (if not all) of the development tools / libraries I need for this are available in Haiku, some even at a newer version than what I have in my daily drivers (GNU/Linux and FreeBSD).
As a first step, I installed Haiku in a virtual machine (it won’t stay just VM-emulated once I learn the ropes). The system is impressively fast to boot and very responsive, even in a VM. Window management is equally impressive, and the system in general seems to fit my needs for a daily driver development environment.

Unfortunately, I can’t go much further because I can’t upgrade or install anything from the main repo. Internet connection is active (I am actually writing this using WebPositive), HaikuPorts works (I actually installed software from there), but the “main” repo won’t work. Trying to update the system fails:

-> pkgman update
Refreshing repository "Haiku" failed  0%: Server not found
100% repochecksum-1 [64 bytes]
Validating checksum for HaikuPorts...done.
Nothing to do

Similar results with pkgman full-sync, pkgman full, HaikuDepot, etc. So trying to install anything from the “Haiku” repo fails. For example:

-> pkgman install emacs
// same output as above, then:
Encountered problems:
problem 1: nothing provides haiku>=r1-beta4_hrev56578_69-1 needed by emacs-29.1-1
  solution 1:
    -do not install "providing emacs"

The web address for the “Haiku” repo corresponds to r1-beta4_hrev57330, which should satisfy the requirement above (>=r1-beta4_hrev56578_69-1). At least that’s what I get if I type the web address for the “Haiku” repo in WebPositive.
I tried to disable the “Haiku” repo and re-enable it, but this won’t work either:

-> pkgman add https://eu.hpkg.haiku-os.org/haiku/r1beta4/$(getarch)/current
Fetching repository info from https://eu.hpkg.haiku-os.org/haiku/r1beta4/x86_64/current ...
*** Failed! : Server not found

My first guess was something is wrong with VirtualBox, but after reading the corresponding section in Haiku documentation, it seems this is not the case. I guess I am missing something here.

Thank you in advance for your time.

Start by checking your dns/name-server settings.

If something was wrong on your network side or on VM config, it would affect other repos as well. If installing from Haikuports works, it is not the case.
It’s probably in the repos configuration. Disabling the depot is not sufficient and you need to also wipe the cache, then remake configuration.
The depot could also be blocked on your FAI DNS though its very unlikely to happen.

It does:

So, indeed it would look like a network problem.

At the end of the page about virtualization: Virtualizing Haiku in VirtualBox | Haiku Project there is an “Haiku cannot connect to the Internet” section. Did you follow the instructions there? (set a different network card type, the default one is not compatible with our drivers).

Once that is done, as said by steampunklolcat, you’ll have to check that DNS resolution is set up correctly (that should happen on its own with DHCP if your network setup has nothing special?) and working (try to open websites in the web browser or use the ping command, for example)

I did, although there was no need. Ping works. I can visit web sites with WebPositive, I even use it to post here. So there is no doubt, Internet connection works.

Installing packages also works, but it seems to work only from HaikuPorts, for example I installed freeimage, jed, mg and others without any problem. I tested the libraries I was able to install that way with some C programs I wrote, and everything worked fine. But I cannot install, e.g., emacs, glfw, and basically most of what I tried, always with the same error saying “nothing provides haiku>=r1beta4_hrev56578_69-1”.

It is just DHCP, there is nothing special in my network setup. There is nothing wrong with my Internet connection in Haiku, other than being unable to have access to Haiku main repo. HaikuPorts seems ok, Haiku doesn’t. And trying to fix the problem I disabled the Haiku repo then tried to re-enable it, only to realize it cannot be enabled again (see first post). I have no idea how to re-enable it to see if that would help.

I don’t mind reinstalling Haiku at this point, but I’m afraid it’s pointless because, new as I am, I was very careful not to mess with the system. Updating the system was the first thing I tried and didn’t work from the first boot of the system. Haiku main repo was supposed to be enabled but I could not update, install, do anything related to it.

I don’t understand what state your are in exactly here. There can be problems in several places:

  • Network problem on your side (I think we have ruled that out now? Unless there is something like a proxy or so interferring)
  • Problems on the haiku server side (surely other people would be seeing similar problems)
  • Some configuration issue like a wrong URL, but the one you put in your message seems correct: https://eu.hpkg.haiku-os.org/haiku/r1beta4/x86_64/current

So, I don’t understand where the “Server not found” error can come from. Normally this happens only if the DNS cannot be resolved. But that would be strange, since both haiku and haikuports repositories are served from the same domain name, so why would one work, but not the other?

Can you share the output of pkgman list-repos to make sure that is set up correctly?

Can you also try pkgman refresh Haiku to make sure the repo is up to date and you don’t have any chaced corrupted files?

Thank you for taking the time to help, I think what you suggested might lead us somewhere:
list-repos won’t list the Haiku repo because like I said I tried to disable then reanable it, but re-enabling doesn’t work. It only lists HaikuPorts now:

~> pkgman list-repos
        HaikuPorts
                base-url:  https://eu.hpkg.haiku-os.org/haikuports/r1beta4/x86_64/current
                identifier: tag:haikuports.org,2013:repositories/haikuports/master/x86_64
                priority:  1

But before disabling it the GUI app for repositories (Preferences → Repositories) had the Haiku repo listed and enabled (although it didn’t work, I could not install or update from it).

And this might explain things?

~> pkgman refresh Haiku
* skipping repository-config '/boot/system/settings/package-repositories/Haiku' : No such file or directory

Is there a way to fix this? To “reset” the repository configuration somehow? Maybe this will fix the problem.

I think you can delete the file /boot/system/settings/package-repositories/Haiku and then add the repository (with pkgman add) again? It looks like something went out of sync, the file is there but not completely seen by pkgman, maybe it is corrupt or incomplete (I had this happen a few times when pkgman ended up downloading a login page for a captive wifi network instead of the file it wanted, for example).

The only file in /boot/system/settings/package-repositories/ is HaikuPorts. I tried to add Haiku again, using the command I found it the documentation:

-> pkgman add https://eu.hpkg.haiku-os.org/haiku/r1beta4/$(getarch)/current
Fetching repository info from https://eu.hpkg.haiku-os.org/haiku/r1beta4/x86_64/current ...

This takes about 3 minutes, and in the end it fails:

*** Failed! : Server not found

@Starcrasher suggested I should “wipe the cache” before adding the Haiku depot again, but I can’t find how to do that in the documentation.

Can you try running wget or curl on that URL and see if it produces a more cogent error message, perhaps?

Just wanted to mention that I’ve seen this “Server not found” issue with pkgman/HaikuDepot myself some months ago. Rest of the network worked just fine.

Situation lasted a couple of days for me before resolving, either by itself, of by something I did, can’t recall.

And I’ve seen at least 2 other users complain of similar situation over the IRC channel.

Nothing more to add, just so @Pap doesn’t feels like they’re on crazy pills or something :stuck_out_tongue:.

Good idea. Both wget and curl basically say they can’t resolve host:

~> wget https://eu.hpkg.haiku-os.org/haiku/r1beta4/x86_64/current ...
--2023-10-17 19:28:08--  https://eu.hpkg.haiku-os.org/haiku/r1beta4/x86_64/current
Resolving eu.hpkg.haiku-os.org... 206.189.242.242
Connecting to eu.hpkg.haiku-os.org|206.189.242.242|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 123 [text/plain]
Saving to: ‘current’

current             100%[===================>]     123  --.-KB/s    in 0s      

2023-10-17 19:28:09 (58.7 MB/s) - ‘current’ saved [123/123]`
Resolving ...... failed: Non-recoverable failure in name resolution.
wget: unable to resolve host address ‘...’
FINISHED --2023-10-17 19:28:09--
Total wall clock time: 1.0s
Downloaded: 1 files, 123 in 0s (58.7 MB/s)

and

~> curl https://eu.hpkg.haiku-os.org/haiku/r1beta4/x86_64/current ...
Route { branch: "r1beta4", arch: "x86_64", version: "r1~beta4_hrev56578_91", path: "r1beta4/x86_64/r1~beta4_hrev56578_91" }curl: (6) Could not resolve host: ...

Thank you for the info. I was afraid people would think I am on pills or I am trolling, because this is indeed a weird problem, hard to believe it’s true - but it’s happening.

Despite that, however, I was able to compile several of my test programs with whatever libraries I could download from HaikuPorts, and so far I didn’t encounter any issue. I think that, if I can resolve that issue, migrating my development environment and libraries to Haiku will be easier than I thought. :slight_smile:

1 Like

Why are those “…” in the url ? Those are not part of it.

wget has downloaded correctly the part until the “current” … When you copied it to paste on the command line, did you expand the textbox or whatever to show all the text before selecting ?

ADDED : oh, and look at what it has saved to the “current” file it created. Maybe some clue in it

In this case, if it happens it would be good to try again with a haiku image prepared with DEBUG=1 for the network kit, pkgman will then make a more comprehensive log where it fails exactly.
(and then open a ticket)

The cache is located in the following path:

/boot/system/cache/package-repositories

Remove the haiku file in there, i’d suggest that you also run the

checkfs /boot
ps: don’t forget to re-run

pkgman add https://eu.hpkg.haiku-os.org/haiku/r1beta4/$(getarch)/current

Update: I installed Haiku again, this time on a USB stick, following the instructions found here. This is a real installation, just on a USB stick. I am familiar with such kind of installations, from other operating systems.

At first, everything looked ok. I could do pkgman update without any problem - it did indeed update several packages. But after rebooting I tried the same for a second time, just to make sure the system is up-to-date, and I get the same problem as before:

pkgman list-repos does list both Haiku and HaikuPorts, but as you can see above the Haiku repo is not working anymore. I tried to refresh, no luck:

-> pkgman refresh Haiku
Fetching repository checksum from https://eu.hpkg.haiku-os.org/haiku/r1beta4/x86_64/current ...
*** failed! : Server not found

Not only that, but many packages won’t install with the exact same problem as in the previous VM installation:

nothing provides haiku>=r1-beta4_hrev56578_69-1 needed by *package_name_here*

And this happens even with HaikuPorts packages: emacs, glfw, freealut, gfortran, to name a few. A few packages can be installed, however, like freeimage, freeimage_devel. I assume those can be installed because they have no dependencies (freeimage is notoriously dependency-free, for example).

Now this is my guess, and I might be wrong here, but I think after pkgman update is done once, the Haiku repository is still there but won’t work because the installer expects r1-beta4_hrev56578_69-1 but the system still thinks it’s r1-beta4_hrev*something-else-here*. For the same reason many HaikuPorts packages won’t install now. The reason I suspect something like that is this:

-> pkgman full
Refreshing repository "Haiku" failed  0%: Server not found
100% repochecksum-1 [64 bytes]
Validating checksum for HaikuPorts...done.
Encountered problems:
problem 1: nothing provides haiku>=r1-beta4_hrev56578_69-1 needed by unzip-6.10c23-5
  solution 1:
    - keep unzip-6.10c23-4 from excluded directory

Selecting solution 1 (which is the only one anyway) brings the next problem, which is very similar:

problem 2: nothing provides haiku>=r1-beta4_hrev56578_87-1 needed by p7zip-17.05-1
  solution 1:
    - keep p7zip-17.04-2 from excluded directory

and so on for many packages, all updated when I did pkgman update for the first time. Notice the difference in version numbers, and how “excluded directory” always has an earlier version. I assume this was the version shipped in the Haiku iso and the newer one is the one after pkgman update. Something is clearly out of sync here.
If I’m not terribly wrong here, something is missing, something to tell the system “forget the package versions you had before the update, now you have newer ones”.

You can try to reinstall again and try pkgman full-sync instead of pkgman update. Does this make a difference?

This seems to give some extra information indeed. Fresh installation, literally the first thing I did was pkgman full-sync. The results are similar, but notice how the Haiku repository is basically unusable even before first system update:

-> pkgman full-sync
Refreshing repository "Haiku" failed  0%: Server not found
100% repochecksum-1 [64 bytes]
Validating checksum for HaikuPorts...done.
100% repochecksum-2 [64 bytes]
Validating checksum for HaikuPorts...done.
Encountered problems:
problem 1: nothing provides haiku>=r1-beta4_hrev56578_87-1 needed by p7zip-17.05-1
  solution 1:
    - keep p7zip-17.04-2 from excluded directory
// Several other similar problems follow if you skip this one

After that, trying pkgman update for the first time does indeed update several packages, all from HaikuPorts. Then same problems as before. HaikuPorts packages with basically no dependencies can be installed (such as mg, freeimage, ne). Everything else can’t.

So the Haiku repository seems somehow unusable right from the beginning. The updater does what it can, which is updating HaikuPorts packages only. The base system is not updated because it is in the Haiku repository. After that the system seems tom be out of sync, and basically a mess.

I am really lost here. To be honest, I wonder why this is not a known bug, since it happens before I do anything myself. Maybe I should try an alternative Haiku repository instead of the default one? And if so, which one?

Well, no one else seems to hit that problem, so far.

The explanations I can think of at this point are, either your Haiku download is corrupt somehow, or there is something strange somewhere between your Haiku system and the package repository that somehow prevents them from talking to each other.

I always check downloads, at least when it is something important. sha256sum on GNU/Linux says my iso is ok, but will try downloading again with Torrent. I’ll be back if this or anything else solves the problem.
Thank you all for your time.