# Build under ubuntu 19.04 DISCO

**URL:** <https://in-thread.sonic-pi.net/t/build-under-ubuntu-19-04-disco/2488>\
**Category:** Support, Help & Resources\
**Created:** [June 15, 2019, 12:15pm UTC](https://in-thread.sonic-pi.net/t/build-under-ubuntu-19-04-disco/2488 "2019-06-15T12:15:57Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![nlb](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/nlb/32/997_2.png) [@nlb](https://in-thread.sonic-pi.net/u/nlb)\
**Post date:** [June 15, 2019, 12:15pm UTC](https://in-thread.sonic-pi.net/t/build-under-ubuntu-19-04-disco/2488/1 "2019-06-15T12:15:57Z")

</div>

Hi,

I try to buid from the sources and meet this issue.

this is the script i use

```ruby
#!/usr/bin/env bash

# Based on https://github.com/samaaron/sonic-pi/blob/master/app/gui/qt/build-ubuntu-app
# Modified by nlb (n-l-b.fr) to try to install on Ubuntu 19.04 TLS
# 15062019 - IT DOES NOT WORK AT ALL - sO SAD BUT We try again and again

#Fail script on first error encountered
set -euo pipefail
IFS=$'\n\t'

#Application/library versions built by this script.
SUPERCOLLIDER_VERSION=3.9.1
SC_PLUGINS_VERSION=3.9.0
AUBIO_VERSION=c6ae035 #0.4.6
OSMID_VERSION=391f35f789f18126003d2edf32902eb714726802

# pb rugged sous 19-04
RUGGED_VERSION=0.28.1

#Internal definitions
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
SP_APP_SRC=${SCRIPT_DIR}
SP_ROOT=${SP_APP_SRC}/../../../../
OSMID_DIR=${SP_APP_SRC}/../../server/native/osmid

echo "This script is for UBUNTU 19.04 DISCO"

#Install dependencies for building supercollider, as well as qt5 and supporting libraries for gui
sudo apt-get install -y \
     g++ ruby ruby-dev pkg-config git build-essential libjack-jackd2-dev \
     libsndfile1-dev libasound2-dev libavahi-client-dev libicu-dev \
     libreadline6-dev libfftw3-dev libxt-dev libudev-dev cmake libboost-all-dev \
     libqwt-qt5-dev libqt5scintilla2-dev libqt5svg5-dev qt5-qmake qt5-default \
     qttools5-dev qttools5-dev-tools qtdeclarative5-dev libqt5webkit5-dev \
     qtpositioning5-dev libqt5sensors5-dev qtmultimedia5-dev libffi-dev \
     libqt5opengl5-dev curl python erlang-base

### IF YOU HAVE PROBLEMS WITH qwt
#cd $SP_APP_SRC/../../../../
#wget 'http://downloads.sourceforge.net/project/qwt/qwt/6.1.2/qwt-6.1.2.tar.bz2'
#tar -xf qwt-6.1.2.tar.bz2
#cd qwt-6.1.2
#/usr/lib/x86_64-linux-gnu/qt5/bin/qmake qwt.pro
#make
#sudo make install
#sudo cp /usr/local/qwt-6.1.2/features/* /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/

### IF YOU HAVE PROBLEMS WITH qscintilla2
# cd $SP_APP_SRC/../../../../
# wget 'http://sourceforge.net/projects/pyqt/files/QScintilla2/QScintilla-2.9.2/QScintilla_gpl-2.9.2.tar.gz'
# tar -xf QScintilla_gpl-2.9.2.tar.gz
# cd QScintilla_gpl-2.9.2/Qt4Qt5/
# /usr/lib/x86_64-linux-gnu/qt5/bin/qmake qscintilla.pro
# make
# sudo make install

#Build supercollider from source
cd ${SP_ROOT}
git clone https://github.com/supercollider/supercollider.git || true
cd supercollider
git fetch # In case we already had it cloned
git checkout Version-${SUPERCOLLIDER_VERSION}
git submodule init && git submodule update
mkdir -p build
cd build
cmake -DSC_EL=no ..
make
sudo make install
#This should install to /usr/local/

#Build sc3 plugins and install to /usr/local/ so supercollider can find them
cd ${SP_ROOT}
git clone https://github.com/supercollider/sc3-plugins.git || true
cd sc3-plugins
git fetch # In case we already had it cloned
git checkout Version-${SC_PLUGINS_VERSION}
git submodule init && git submodule update
cp -r external_libraries/nova-simd/* source/VBAPUGens
mkdir -p build
cd build
cmake -DSC_PATH=/usr/local/include/SuperCollider -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release ..
make
sudo make install

#Install libaubio (apt-get version is too old)
cd ${SP_ROOT}
git clone https://git.aubio.org/aubio/aubio/ || true
cd aubio
git fetch # In case we already had it cloned
git checkout ${AUBIO_VERSION}
make getwaf
./waf configure
./waf build
sudo ./waf install

#Install osmid (for MIDI support)
cd ${SP_ROOT}
git clone https://github.com/llloret/osmid.git || true
cd osmid
git fetch # In case we already had it cloned
git checkout ${OSMID_VERSION}
mkdir -p build
cd build
cmake ..
make
mkdir -p ${OSMID_DIR}
install m2o o2m -t ${OSMID_DIR}

#Build Erlang files
cd ${SP_APP_SRC}/../../server/erlang
#The current implementation of osc.erl uses Erlang features that require
#at least Erlang 19.1 to be installed. 16.04 LTS is currently at 18.3.
#If versions < 19.1 are installed, and we use the current code, the MIDI
#implementation breaks because the Erlang OSC router is failing.
ERLANG_VERSION=$(./print_erlang_version)
if [-e "osc.erl.orig"]; then
    # Handle, if the original file in the source tree ever gets updated.
    rm osc.erl.orig
    git checkout osc.erl
fi
if [["${ERLANG_VERSION}" < "19.1"]]; then
    echo "Found Erlang version < 19.1 (${ERLANG_VERSION})! Updating source code."
    sed -i.orig 's|erlang:system_time(nanosecond)|erlang:system_time(nano_seconds)|' osc.erl
fi
erlc osc.erl
erlc pi_server.erl

# RUGGED :(
# If you're having trouble with rugged, this should install rugged and copy it to the Sonic Pi folder.
# sudo gem install rugged
cp -a "/var/lib/gems/2.5.0/gems/rugged-0.28.1/." "../../server/ruby/vendor/rugged-0.28.1/" # You may need to change this path slightly

#Build sonic-pi server extensions, documentation, and binary.
cd ${SP_APP_SRC}
../../server/ruby/bin/compile-extensions.rb
../../server/ruby/bin/i18n-tool.rb -t
cp -f ruby_help.tmpl ruby_help.h
../../server/ruby/bin/qt-doc.rb -o ruby_help.h

echo "Building sonic-pi binary..."
lrelease SonicPi.pro
qmake -qt=qt5 SonicPi.pro
make

```

```ruby
10: from ../../server/ruby/bin/qt-doc.rb:22:in `<main>'
	 9: from ../../server/ruby/bin/qt-doc.rb:22:in `require_relative'
	 8: from /home/nlb/audio/installSPI-15062019/sonic-pi/app/server/ruby/lib/sonicpi/runtime.rb:21:in `<top (required)>'
	 7: from /home/nlb/audio/installSPI-15062019/sonic-pi/app/server/ruby/lib/sonicpi/runtime.rb:21:in `require_relative'
	 6: from /home/nlb/audio/installSPI-15062019/sonic-pi/app/server/ruby/lib/sonicpi/gitsave.rb:14:in `<top (required)>'
	 5: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:39:in `require'
	 4: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:135:in `rescue in require'
	 3: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:135:in `require'
	 2: from /home/nlb/audio/installSPI-15062019/sonic-pi/app/server/ruby/vendor/rugged-0.26.0/lib/rugged.rb:6:in `<top (required)>'
	 1: from /home/nlb/audio/installSPI-15062019/sonic-pi/app/server/ruby/vendor/rugged-0.26.0/lib/rugged.rb:14:in `rescue in <top (required)>'
/home/nlb/audio/installSPI-15062019/sonic-pi/app/server/ruby/vendor/rugged-0.26.0/lib/rugged.rb:14:in `require_relative': cannot load such file -- /home/nlb/audio/installSPI-15062019/sonic-pi/app/server/ruby/rb-native/2.5.0/rugged (LoadError)

```

Any idea of what does that mean ?  
Which version of rugged we should use ?  
Thanks for help  
cheers

---

<div class="post-metadata">

**Author:** ![mrvanes](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/mrvanes/32/1019_2.png) [@mrvanes](https://in-thread.sonic-pi.net/u/mrvanes)\
**Post date:** [July 4, 2019, 9:43pm UTC](https://in-thread.sonic-pi.net/t/build-under-ubuntu-19-04-disco/2488/2 "2019-07-04T21:43:57Z")

</div>

Here’s my working ubuntu 19.04 DISCO build script for 3.1.0

```
#!/bin/bash

#Fail script on first error encountered
set -e

#Application/library versions built by this script.
SUPERCOLLIDER_VERSION=3.9.0
SC_PLUGINS_VERSION=${SUPERCOLLIDER_VERSION}
AUBIO_VERSION=0.4.5
# OSMID_VERSION=391f35f789f18126003d2edf32902eb714726802
OSMID_VERSION=v0.6.7
# OSMID_VERSION=master

RUGGED_VERSION=v0.28.2

#Internal definitions
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
SP_APP_SRC=${SCRIPT_DIR}
SP_ROOT=${SP_APP_SRC}/../../../../
OSMID_DIR=${SP_APP_SRC}/../../server/native/linux/osmid

echo "This script has been tested on ubuntu 19.04."
echo "We're working to make this script a one shot solution for all Linux platforms"
echo "Please direct rage and suggestions to Factoid in (https://gitter.im/samaaron/sonic-pi)"

#Install dependencies for building supercollider, as well as qt5 and supporting libraries for gui
sudo apt-get install -y \
     g++ ruby ruby-dev pkg-config git build-essential libjack-jackd2-dev \
     libsndfile1-dev libasound2-dev libavahi-client-dev libicu-dev \
     libreadline6-dev libfftw3-dev libxt-dev libudev-dev cmake libboost-dev \
     libqwt-qt5-dev libqt5svg5-dev qt5-qmake qt5-default \
     qttools5-dev qttools5-dev-tools qtdeclarative5-dev libqt5webkit5-dev \
     qtpositioning5-dev libqt5sensors5-dev qtmultimedia5-dev libffi-dev \
     libqt5opengl5-dev curl python erlang-base libqscintilla2-qt5-dev

### IF YOU HAVE PROBLEMS WITH qwt
#cd $SP_APP_SRC/../../../../
#wget 'http://downloads.sourceforge.net/project/qwt/qwt/6.1.2/qwt-6.1.2.tar.bz2'
#tar -xf qwt-6.1.2.tar.bz2
#cd qwt-6.1.2
#/usr/lib/x86_64-linux-gnu/qt5/bin/qmake qwt.pro
#make
#sudo make install
#sudo cp /usr/local/qwt-6.1.2/features/* /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/

### IF YOU HAVE PROBLEMS WITH qscintilla2
#cd $SP_APP_SRC/../../../../
#wget 'http://sourceforge.net/projects/pyqt/files/QScintilla2/QScintilla-2.9.2/QScintilla_gpl-2.9.2.tar.gz'
#tar -xf QScintilla_gpl-2.9.2.tar.gz
#cd QScintilla_gpl-2.9.2/Qt4Qt5/
#/usr/lib/x86_64-linux-gnu/qt5/bin/qmake qscintilla.pro
#make
#sudo make install

#Build supercollider from source
cd ${SP_ROOT}
git clone https://github.com/supercollider/supercollider.git || true
cd supercollider
git checkout Version-${SUPERCOLLIDER_VERSION}
git submodule init && git submodule update
mkdir -p build
cd build
cmake -DSC_EL=no ..
make
sudo make install
#This should install to /usr/local/

#Build sc3 plugins and install to /usr/local/ so supercollider can find them
cd ${SP_ROOT}
git clone https://github.com/supercollider/sc3-plugins.git || true
cd sc3-plugins
git checkout Version-${SC_PLUGINS_VERSION}
git submodule init && git submodule update
cp -r external_libraries/nova-simd/* source/VBAPUGens
mkdir -p build
cd build
cmake -DSC_PATH=/usr/local/include/SuperCollider -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release ..
make
sudo make install

#Install libaubio (apt-get version is too old)
cd ${SP_ROOT}
git clone https://git.aubio.org/aubio/aubio/ || true
cd aubio
git checkout ${AUBIO_VERSION}
make getwaf
./waf configure
./waf build
sudo ./waf install

#Install osmid (for MIDI support)
cd ${SP_ROOT}
git clone https://github.com/llloret/osmid.git || true
cd osmid
git checkout ${OSMID_VERSION}
mkdir -p build
cd build
cmake ..
make
mkdir -p ${OSMID_DIR}
install m2o o2m -t ${OSMID_DIR}

#Build Erlang files
cd ${SP_APP_SRC}/../../server/erlang
#The current implementation of osc.erl uses Erlang features that require
#at least Erlang 19.1 to be installed. 16.04 LTS is currently at 18.3.
#If versions < 19.1 are installed, and we use the current code, the MIDI
#implementation breaks because the Erlang OSC router is failing.
ERLANG_VERSION=$(./print_erlang_version)
if [-e "osc.erl.orig"]; then
    # Handle, if the original file in the source tree ever gets updated.
    rm osc.erl.orig
    git checkout osc.erl
fi
if [["${ERLANG_VERSION}" < "19.1"]]; then
    echo "Found Erlang version < 19.1 (${ERLANG_VERSION})! Updating source code."
    sed -i.orig 's|erlang:system_time(nanosecond)|erlang:system_time(nano_seconds)|' osc.erl
fi
erlc osc.erl
erlc pi_server.erl

# Fix Rugged
cd ${SP_APP_SRC}/../../server/ruby/vendor
if [! -d rugged-${RUGGED_VERSION}]; then
    git clone -b ${RUGGED_VERSION} --recurse-submodules https://github.com/libgit2/rugged.git rugged-${RUGGED_VERSION}
    cd rugged-${RUGGED_VERSION}/vendor/libgit2
    mkdir -p build
    cd build
    cmake ..
fi
cd ${SP_APP_SRC}
sed -i "s/rugged-0.26.0/rugged-${RUGGED_VERSION}/g" ../../server/ruby/bin/compile-extensions.rb

# Fix SonicPi.pro
sed -i "s/-lqt5scintilla2/-lqscintilla2_qt5/g" SonicPi.pro

#Build sonic-pi server extensions, documentation, and binary.
cd ${SP_APP_SRC}
../../server/ruby/bin/compile-extensions.rb
../../server/ruby/bin/i18n-tool.rb -t
cp -f ruby_help.tmpl ruby_help.h
../../server/ruby/bin/qt-doc.rb -o ruby_help.h
lrelease SonicPi.pro
qmake -qt=qt5 SonicPi.pro
make
```

---

<div class="post-metadata">

**Author:** ![samaaron](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/samaaron/32/7_2.png) [@samaaron](https://in-thread.sonic-pi.net/u/samaaron)\
**Post date:** [July 5, 2019, 7:58am UTC](https://in-thread.sonic-pi.net/t/build-under-ubuntu-19-04-disco/2488/3 "2019-07-05T07:58:07Z")

</div>

Lovely stuff.

Is there any chance you could make a pull request in the Github repo with these changes?

---

<div class="post-metadata">

**Author:** ![mrvanes](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/mrvanes/32/1019_2.png) [@mrvanes](https://in-thread.sonic-pi.net/u/mrvanes)\
**Post date:** [July 5, 2019, 8:09am UTC](https://in-thread.sonic-pi.net/t/build-under-ubuntu-19-04-disco/2488/4 "2019-07-05T08:09:37Z")

</div>

The changes are quite disco specific, I suggest we introduce a build-ubuntu-disco-app script or do you want to change everything the script changes in place?

---

<div class="post-metadata">

**Author:** ![nlb](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/nlb/32/997_2.png) [@nlb](https://in-thread.sonic-pi.net/u/nlb)\
**Post date:** [July 6, 2019, 1:56pm UTC](https://in-thread.sonic-pi.net/t/build-under-ubuntu-19-04-disco/2488/5 "2019-07-06T13:56:06Z")

</div>

Hi @mrvanes

You (the dj) save my life with this song (script)  
It works like a charm with the latest verson of Sonic Pi pulled from GitHub. So we can say SonicPi is still working under Linux 🙂

 ![2dev-on-Ubuntu-1904-Disco-](https://europe1.discourse-cdn.com/flex017/uploads/sonic_pi/original/2X/0/02728475c1c4a416f3834cf2532bc68771cf8b58.jpeg)

Again thanks !

---

<div class="post-metadata">

**Author:** ![mrvanes](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/mrvanes/32/1019_2.png) [@mrvanes](https://in-thread.sonic-pi.net/u/mrvanes)\
**Post date:** [July 7, 2019, 10:47am UTC](https://in-thread.sonic-pi.net/t/build-under-ubuntu-19-04-disco/2488/6 "2019-07-07T10:47:32Z")

</div>

Thx! The version in this pull request also bumps all dependencies to their latest version, and it still builds and works. [https://github.com/samaaron/sonic-pi/pull/2098](https://github.com/samaaron/sonic-pi/pull/2098)  
Also, if you build 3.1.0 make sure to copy the synthdefs from master because the 3.1.0 versions are broken.

---

<div class="post-metadata">

**Author:** ![Chip\_luxury\_E.W.A](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/chip_luxury_e.w.a/32/1756_2.png) [@Chip\_luxury\_E.W.A](https://in-thread.sonic-pi.net/u/Chip_luxury_E.W.A)\
**Post date:** [July 8, 2019, 6:44pm UTC](https://in-thread.sonic-pi.net/t/build-under-ubuntu-19-04-disco/2488/7 "2019-07-08T18:44:40Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![robin.newman](https://avatars.discourse-cdn.com/v4/letter/r/76d3ee/32.png) [@robin.newman](https://in-thread.sonic-pi.net/u/robin.newman)\
**Post date:** [July 8, 2019, 7:02pm UTC](https://in-thread.sonic-pi.net/t/build-under-ubuntu-19-04-disco/2488/8 "2019-07-08T19:02:40Z")

</div>

I guess you clone the sonic pi distro from github [here](https://github.com/samaaron/sonic-pi) 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 ubuntudiscobuild.sh you need to make it excutable using  
`chmod +x ubuntudiscobuild.sh`  
you then run it from that location using  
`./ubuntudiscobuild.sh`

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.

---

<div class="post-metadata">

**Author:** ![Chip\_luxury\_E.W.A](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/chip_luxury_e.w.a/32/1756_2.png) [@Chip\_luxury\_E.W.A](https://in-thread.sonic-pi.net/u/Chip_luxury_E.W.A)\
**Post date:** [July 9, 2019, 5:59am UTC](https://in-thread.sonic-pi.net/t/build-under-ubuntu-19-04-disco/2488/9 "2019-07-09T05:59:32Z")

</div>

Thanks @robin.newman but i got some problems.

I downloaded the ‘sonic-pi-master.zip’ from the link.  
Extract and place the folder in:

> /home/chip\_luxury/sonic-pi-mastr

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

> /home/chip\_luxury/sonic-pi-master/app/gui/qt

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

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:in `require\_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?

---

<div class="post-metadata">

**Author:** ![mrvanes](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/mrvanes/32/1019_2.png) [@mrvanes](https://in-thread.sonic-pi.net/u/mrvanes)\
**Post date:** [July 9, 2019, 6:23am UTC](https://in-thread.sonic-pi.net/t/build-under-ubuntu-19-04-disco/2488/10 "2019-07-09T06:23:02Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![nlb](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/nlb/32/997_2.png) [@nlb](https://in-thread.sonic-pi.net/u/nlb)\
**Post date:** [July 9, 2019, 8:27am UTC](https://in-thread.sonic-pi.net/t/build-under-ubuntu-19-04-disco/2488/11 "2019-07-09T08:27:46Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Chip\_luxury\_E.W.A](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/chip_luxury_e.w.a/32/1756_2.png) [@Chip\_luxury\_E.W.A](https://in-thread.sonic-pi.net/u/Chip_luxury_E.W.A)\
**Post date:** [July 10, 2019, 9:02am UTC](https://in-thread.sonic-pi.net/t/build-under-ubuntu-19-04-disco/2488/12 "2019-07-10T09:02:14Z")

</div>

@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)

---

<div class="post-metadata">

**Author:** ![mrvanes](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/mrvanes/32/1019_2.png) [@mrvanes](https://in-thread.sonic-pi.net/u/mrvanes)\
**Post date:** [July 10, 2019, 1:35pm UTC](https://in-thread.sonic-pi.net/t/build-under-ubuntu-19-04-disco/2488/13 "2019-07-10T13:35:34Z")

</div>

@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:

```ruby
$ git clone https://github.com/samaaron/sonic-pi.git
$ cd sonic-pi/app/gui/qt

```

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

```ruby
$ wget https://raw.githubusercontent.com/samaaron/sonic-pi/5e58c2b44afe535c87fe7246e22b4ec79461c7c9/app/gui/qt/build-ubuntu-disco-app
$ chmod +x build-ubuntu-disco-app
$ ./build-ubuntu-disco-app

```

Cross your arms and watch it work…

---

<div class="post-metadata">

**Author:** ![Chip\_luxury\_E.W.A](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/chip_luxury_e.w.a/32/1756_2.png) [@Chip\_luxury\_E.W.A](https://in-thread.sonic-pi.net/u/Chip_luxury_E.W.A)\
**Post date:** [July 10, 2019, 5:31pm UTC](https://in-thread.sonic-pi.net/t/build-under-ubuntu-19-04-disco/2488/14 "2019-07-10T17:31:09Z")

</div>

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

I tried to execute (also tried with sonic-pi.sh)  
`~/home/chip_luxury/sonic-pi/bin/sonic-pi`

how do I run sonic-pi now?

---

<div class="post-metadata">

**Author:** ![nlb](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/nlb/32/997_2.png) [@nlb](https://in-thread.sonic-pi.net/u/nlb)\
**Post date:** [July 10, 2019, 6:41pm UTC](https://in-thread.sonic-pi.net/t/build-under-ubuntu-19-04-disco/2488/15 "2019-07-10T18:41:43Z")

</div>

```ruby
cd ~/home/chip_luxury/sonic-pi/bin/
./sonic-pi

```

---

<div class="post-metadata">

**Author:** ![Chip\_luxury\_E.W.A](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/chip_luxury_e.w.a/32/1756_2.png) [@Chip\_luxury\_E.W.A](https://in-thread.sonic-pi.net/u/Chip_luxury_E.W.A)\
**Post date:** [July 11, 2019, 6:16am UTC](https://in-thread.sonic-pi.net/t/build-under-ubuntu-19-04-disco/2488/16 "2019-07-11T06:16:13Z")

</div>

@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?

 ![Screenshot%20from%202019-07-11%2009-02-08](https://europe1.discourse-cdn.com/flex017/uploads/sonic_pi/original/2X/e/ee9ad446558c78f1d1559d2e236dd5d22066bca3.png)

---

<div class="post-metadata">

**Author:** ![nlb](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/nlb/32/997_2.png) [@nlb](https://in-thread.sonic-pi.net/u/nlb)\
**Post date:** [July 11, 2019, 7:03am UTC](https://in-thread.sonic-pi.net/t/build-under-ubuntu-19-04-disco/2488/17 "2019-07-11T07:03:27Z")

</div>

Well.

First of all do you follow these steps

```ruby
git clone https://github.com/samaaron/sonic-pi.git
$ cd sonic-pi/app/gui/qt

```

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

Copy Code

```ruby
$ wget https://raw.githubusercontent.com/samaaron/sonic-pi/5e58c2b44afe535c87fe7246e22b4ec79461c7c9/app/gui/qt/build-ubuntu-disco-app
$ 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.

---

<div class="post-metadata">

**Author:** ![mrvanes](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/mrvanes/32/1019_2.png) [@mrvanes](https://in-thread.sonic-pi.net/u/mrvanes)\
**Post date:** [July 11, 2019, 11:42am UTC](https://in-thread.sonic-pi.net/t/build-under-ubuntu-19-04-disco/2488/18 "2019-07-11T11:42:11Z")

</div>

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:

```ruby
$ sudo apt install libssl-dev

```

and then rerun the build.

I’ve updated the build script, it’s available from here:  
[https://raw.githubusercontent.com/samaaron/sonic-pi/8e76a7478dec48debdad1dd0478c8f681d9cf1c9/app/gui/qt/build-ubuntu-disco-app](https://raw.githubusercontent.com/samaaron/sonic-pi/8e76a7478dec48debdad1dd0478c8f681d9cf1c9/app/gui/qt/build-ubuntu-disco-app)

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

---

<div class="post-metadata">

**Author:** ![Chip\_luxury\_E.W.A](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/chip_luxury_e.w.a/32/1756_2.png) [@Chip\_luxury\_E.W.A](https://in-thread.sonic-pi.net/u/Chip_luxury_E.W.A)\
**Post date:** [July 11, 2019, 5:22pm UTC](https://in-thread.sonic-pi.net/t/build-under-ubuntu-19-04-disco/2488/19 "2019-07-11T17:22:15Z")

</div>

@nlb this is with your code: [https://pastebin.com/jM4bxYSJ](https://pastebin.com/jM4bxYSJ)  
@mrvanes this is with copypaste of the script and run it in terminal: [https://pastebin.com/YhUh0ER1](https://pastebin.com/YhUh0ER1)  
thanks!  
I can also switch to another version of ubuntu if necessary…

---

<div class="post-metadata">

**Author:** ![mrvanes](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/mrvanes/32/1019_2.png) [@mrvanes](https://in-thread.sonic-pi.net/u/mrvanes)\
**Post date:** [July 11, 2019, 7:27pm UTC](https://in-thread.sonic-pi.net/t/build-under-ubuntu-19-04-disco/2488/20 "2019-07-11T19:27:40Z")

</div>

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:

```ruby
$ 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 😉

[Next page](https://in-thread.sonic-pi.net/t/build-under-ubuntu-19-04-disco/2488.md?page=2)
