For my current project I want to run crystal on my new Raspberry Pi 3 Model B. But the installation fails every time.
What I ran:
$ curl https://dist.crystal-lang.org/apt/setup.sh | sudo bash
Where it fails: $ sudo apt-get update
What is the error: Error in request, could not read "main/binary-armhf/Packages" from Release-file
How could I solve this error? My researches say, it is a problem with the kernel, because I use raspbian and a armhf architecture, no amd64 one.
We don't (yet) provide binary packages for crystal on Raspberry Pi. Please read this if you want to install from source.
@RX14 Thanks for the answer, I hope you will provide it soon. It is an awesome programming language.
@RX14 I got an error while compiling crystal on my vm:
ubuntu@ubuntu-xenial:~$ ./bin/crystal build src/compiler/crystal.cr --cross-compile --target arm-unknown-linux-gnueabih
f --release -s -D without_openssl -D without_zlib
-bash: ./bin/crystal: No such file or directory
ubuntu@ubuntu-xenial:~$ cd crystal/
ubuntu@ubuntu-xenial:~/crystal$ ./bin/crystal build src/compiler/crystal.cr --cross-compile --target arm-unknown-linux-
gnueabihf --release -s -D without_openssl -D without_zlib
ERROR: LLVM was built without ARM target
0x556b5e: ??? at ??
0x110dbbd: ??? at ??
0x1185a7f: ??? at ??
0x11709e2: ??? at ??
0x1cc6f4e: ??? at ??
0x5b26c9: ??? at ??
0x57e19d: main at ??
0x7f5750960830: __libc_start_main at ??
0x556281: ??? at ??
Error: you've found a bug in the Crystal compiler. Please open an issue, including source code that will allow us to reproduce the bug: https://github.com/crystal-lang/crystal/issues
And I build LLVM with ARM: http://llvm.org/docs/HowToBuildOnARM.html
Well, it looks like the llvm in your x86 ubuntu VM was built without ARM support. Not sure how to install that on ubuntu.
Most helpful comment
@RX14 Thanks for the answer, I hope you will provide it soon. It is an awesome programming language.