Build under ubuntu 19.04 DISCO

Thx! The version in this pull request also bumps all dependencies to their latest version, and it still builds and works.
Also, if you build 3.1.0 make sure to copy the synthdefs from master because the 3.1.0 versions are broken.

1 Like

Hi everyone, how do i run this script? thanks!

I guess you clone the sonic pi distro from github here onto your Ubuntu box. Then copy the script to the location SOINC-PI/app/gui/qt
where SONIC-PI is the location of your cloned copy. eg ~/home/username/sonic-pi if you have put it in your home folder.
if you call the script you need to make it excutable using
chmod +x
you then run it from that location using

All being well you go and have a cup of tea, and wait for it to finish.
You run the compiled program using ~/home/username/sonic-pi/bin/sonic-pi assuming it is in your home folder.


Thanks @robin.newman but i got some problems.

I downloaded the ‘’ from the link.
Extract and place the folder in:


Created a new text file name sp3inst and paste the code from @mrvanes post.
I saved the text file as and placed it in :


Then opened the qt folder in terminal and run the codes:
chmod +x
sudo ./

and then got this:

1: from /home/chip_luxury/sonic-pi-master/app/server/ruby/vendor/rugged-0.26.0/lib/rugged.rb:14:in rescue in <top (required)>' /home/chip_luxury/sonic-pi-master/app/server/ruby/vendor/rugged-0.26.0/lib/rugged.rb:14:inrequire_relative’: cannot load such file – /home/chip_luxury/sonic-pi-master/app/server/ruby/rb-native/2.5.0/rugged (LoadError)

@nlb can you be my DJ? please write a step by step of what you did thanks.

ubuntu version:

No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 19.04
Release: 19.04
Codename: disco

I tried like 4 times how can i “uninstall” and try again fresh?

The script should never ever have touched rugged-0.26.0, so something must have went wrong replacing the original rugged reference in compile-extensions.rb.
The line responsible for replacing rugged is:
sed -i "s/rugged-0.26.0/rugged-${RUGGED_VERSION}/g" ../../server/ruby/bin/compile-extensions.rb

So, either you don’t have sed on your system (I don’t think so) or the lines has changed in master, so that the string rugged-0.26.0 doesn’t match anymore.

Knowing this, it shouldn’t be too difficult to fix compile-extensions.rb, it should point to rugged-v0.28.2, assuming to kept RUGGED_VERSION at v0.28.2

hi @Chip_luxury_E.W.A

well @robin.newman post is the way to follow and that’s the steps i have done.

I guess you download the zip file. so the name folder you get is different than the one if you use git clone.
So i suggest you to rename your sonic-pi-master into sonic-pi and maybe the paths will be fixed.

hope it helps.

ps : Burn down the disco, Hang the blessed DJ

@nlb thank you but changing the folder name to sonic-pi didn’t help.
@mrvanes what files do I need to edit and how? (linux noob)

@Chip_luxury_E.W.A you really shouldn’t. The script should do all that for you, but it’s hard to tell what went wrong in your case. You might try to start over cloning the sonic-pi repo instead of downloading the zip, that’s what we all did:

$ git clone
$ cd sonic-pi/app/gui/qt

Get the ubuntu-disco build script, make it executable and start it

$ wget
$ chmod +x build-ubuntu-disco-app
$ ./build-ubuntu-disco-app

Cross your arms and watch it work…

@mrvanes thanks, after fresh install of ubuntu 19.04 it’s look like it install sonic-pi.

I tried to execute (also tried with

how do I run sonic-pi now?

cd ~/home/chip_luxury/sonic-pi/bin/

@nlb thanks, I manage to execute the commands as you can see at the down-right terminal.
The sonic-pi file run but there is a problem with line 20, I add a list of the folder it trying to get a file from, it does not seems that the file is there, or maybe I have a problem with the folder location?
do I needed to run “sudo apt-get install sonic-pi” after ubuntu installation or something like that?


First of all do you follow these steps

git clone
$ cd sonic-pi/app/gui/qt

Get the ubuntu-disco build script, make it executable and start it

Copy Code

$ wget
$ chmod +x build-ubuntu-disco-app
$ ./build-ubuntu-disco-app


If yes do you have error messages or not ?

ps : you don’t have to apt get install sonic-pi because the way to install is not via a package but via a script build-ubuntu-disco-app which contains plenty of commands to install pieces of software for sonic-pi to work.

The error you show just tells us the build never completed (there simply is no sonic-pi executable), probably because you’re missing a crucial package that we tinkerers for some reason all have installed. I can’t for the life of me think of what that should be unless you share (pastebin) the complete log of your build process. Would be good to know what’s missing on a vanilla dingo install.

update: You are missing libssl-dev for rugged. Install it like this:

$ sudo apt install libssl-dev

and then rerun the build.

I’ve updated the build script, it’s available from here:

It now also checks if you have enough memory, because I needed to add 4G to my VM before it succesfully built!

@nlb this is with your code:
@mrvanes this is with copypaste of the script and run it in terminal:
I can also switch to another version of ubuntu if necessary…

Ok, I have seen that but didn’t know how to solve in the script. It’s ruby and gems and I don’t know what I’m doing there.
It seems for some reason my version of rugged (0.28.2) misses some magic so that the gem doesn’t get installed by the compile-extensions.rb script. You can solve this by hand this way:

$ cd ~/home/chip_luxury/sonic-pi/app/server/ruby/vendor/rugged-v0.28.2/
$ gem build rugged.gemspec
$ sudo gem install rugged

Maybe a ruby guru can look into this and tell me what’s missing after the clone I do to replace rugged?
Maybe the gem build command is all that’s needed, who will tell?

Anyway, after the commands above, the build will finally succeed, I promise :wink:

i think it’s not a good idea imho you should comment the exit line to let the user have a try. I do build script with less memory this afternoon but fails with the same rugged error.

Here’s a new version that forces rugged gem to be installed system wide, although I don’t understand why.

@nlb you can change the script as much as you want, but it looks like you didn’t compile it succesfully yet? :wink:

hi @mrvanes

well just to tell it works with less memory :wink: 2933 to be accurate.




i bet we can do less :slight_smile: see you soon