Blog: Announcing new apt and rpm repositories - Reloaded

Bintray is shutting down all operations on May 1st, 2021 and our previous repositories won’t be available anymore. Please update to the new OBS repositories.

1 Like

I get an error when I run it:

$ curl -fsSL https://crystal-lang.org/install.sh | sudo bash
[sudo] password for daniel:              
ERROR: Unable to identify distribution. You may specify one with environment variable DISTRO_REPO
ERROR: Please, report to https://forum.crystal-lang.org/c/help-support/11

I’m running Linux Mint 20.

ERROR: Unable to identify distribution. You may specify one with environment variable DISTRO_REPO

What is the environment variable that I am supposed to set?

ERROR: Please, report to Help & Support - Crystal Forum

I looked at Help & Support - Crystal Forum, but not sure where I should post this. Is there an existing topic I should post under, or should I create a new topic?

Thanks for reporting. Linux Mint currently isn’t covered, yet. Only the main distributions for which OBS has dedicated repositories (see Install package devel:languages:crystal / crystal).

The environment variable is DISTRO_REPO. For Linux Mint 20 the most fitting value would probably be DISTRO_REPO=xUbuntu_20.04.

Posting this here is fine :+1:

The installer can’t possibly cover each and every Linux distribution out there. So I suppose it should use some kind of a fall back, when the name can’t be recognized, try to figure out whether it uses deb (or rpm) and default to the repo for the latest ubuntu/debian release (or fedora). At least the deb packages should be all identical at the moment, so it doesn’t really matter which repo is picked (we can’t be certain this won’t change in the future, though). And for rpm-based distros there’s already some variation, i.e. a chance that the pick won’t work.

No go. :frowning:

$ curl -fsSL https://crystal-lang.org/install.sh | VERSION_ID=20.04 DISTRO_REPO=xUbuntu_20.04 sudo bash
ERROR: Unable to identify distribution. You may specify one with environment variable DISTRO_REPO
ERROR: Please, report to https://forum.crystal-lang.org/c/help-support/11

By default sudo doesn’t pass environment variables. You could pass the --preserve-env flag or do sudo sh -c 'DISTRO_REPO=xUbuntu_20.04 bash'.

Thanks! curl -fsSL https://crystal-lang.org/install.sh | sudo sh -c 'DISTRO_REPO=xUbuntu_20.04 bash' worked! :slight_smile: (Well, it says the latest is 1.0.0-1+60.1 and that is currently installed now … which seems to match up with what I’m seeing in Index of /repositories/devel:/languages:/crystal/xUbuntu_20.04 .)
That brings me up to:

$ crystal -v
Crystal 1.0.0 [dd40a2442] (2021-03-22)

LLVM: 10.0.0
Default target: x86_64-unknown-linux-gnu

(I’m not sure if asdf is conflicting/confusing things.)

I assume that the package date (2021-04-30) is gonna normally be a bit after the Crystal date (2021-03-22). That’s a big difference in dates this time, but probably understandable for a 1st time setup in this packaging system.

Thanks for the notification! It’s also awesome to see OpenSUSE support. Running the installation script didn’t update everything automatically (like I assume it’s supposed to for other OSes), but a zypper removerepo Crystal beforehand and zypper update crystal -f after did the trick.

2 Likes

Yes, this is just because we’ve been building and publishing the package on OBS just now.
With upcoming releases the packages should be available pretty much instantaneous.

Yes, you still need some manual steps to migrate from the previous configuration. See Update on_opensuse.md by Stig124 · Pull Request #139 · crystal-lang/crystal-website · GitHub

2 Likes