sonic-pi-net / sonic-pi

Code. Music. Live.
https://sonic-pi.net
Other
10.83k stars 922 forks source link

[solved] `Could not open library 'libaubio'` on ubuntu 20.04 #2368

Closed 0atman closed 3 years ago

0atman commented 4 years ago

Following the excellent INSTALL-LINUX.md by @SunderB, (and after apt installing libjack-jackd2-0 and libffi7) I came across this error while running unix-prebuild.sh:

/home/oatman/Downloads/sonic-pi/app/server/ruby/vendor/ffi-1.11.3/lib/ffi/library.rb:145:in `block in ffi_lib': Could not open library 'libaubio.4.2.2.dylib': libaubio.4.2.2.dylib: cannot open shared object file: No such file or directory. (LoadError)
Could not open library 'libaubio.4.2.2.dylib.so': libaubio.4.2.2.dylib.so: cannot open shared object file: No such file or directory.
Could not open library 'libaubio.so.1': libaubio.so.1: cannot open shared object file: No such file or directory.
Could not open library 'aubio1.dll': aubio1.dll: cannot open shared object file: No such file or directory.
Could not open library 'libaubio1.dll.so': libaubio1.dll.so: cannot open shared object file: No such file or directory.
Could not open library 'libaubio-5.dll': libaubio-5.dll: cannot open shared object file: No such file or directory.
Could not open library 'libaubio-5.dll.so': libaubio-5.dll.so: cannot open shared object file: No such file or directory

I want to document that you can solve this in two ways:

Fix the first

Run the commented-out ./unix-prebuild.sh --build-aubio from INSTALL-LINUX.md (why not make this the default behaviour, given the problems with distros' aubio?)

Fix the Second

sudo apt install libaubio-dev
sudo cp /usr/lib/x86_64-linux-gnu/libaubio.so /usr/lib/x86_64-linux-gnu/libaubio.so.1
./unix-prebuild.sh

I tried fix 2 before fix 1, due to comment blindness.

0atman commented 4 years ago

I've added this issue to raise visibility :ok_hand:

0atman commented 4 years ago

I took the liberty of building a simple installer script, this should be a one-liner install for fresh 20.04 install:

bash <(curl -fsSL http://oat.sh/sonic-pi-20-04)
rbnpi commented 4 years ago

I use the package libaubio5 which installs /usr/lib/x86_64-linux-gnu/libaubio.so.5 I found that the SP software searched for libaubio-5.so and so I did a link ln -s /usr/lib/x86_64-linux-gnu/libaubio.so.5 <sonic-pi>/app/server/native/lib/libaubio-5.so You could build from unix-prebuild.sh and it's fin on ubuntu 20.04 but can be a bit slow on things like Raspberry Pi, so I prefer to use the available package.

I am just doing testing on an ubuntu binary .deb to install SP on 20.04 similar to the one I have done for RPi.

0atman commented 4 years ago

@rbnpi an Ubuntu 20.04 deb would be incredible, thank you! Tag me if you want help testing 💪

ethancrawford commented 3 years ago

@rbnpi - is this issue still relevant?

rbnpi commented 3 years ago

Not for version 4 where libaubio is not used. I have published binary debs for 20.04 and 21.04 so the can be used directly. I think this could be closed.

ethancrawford commented 3 years ago

Ok, good to know!

0atman commented 3 years ago

Cheers friends. @rbnpi where might I find these debs?