Skip to content

Install Ubuntu

Randall C. O'Reilly edited this page Mar 16, 2021 · 2 revisions

Ubuntu Install

  • The original install used an apt repository hosted on grey.colorado.edu -- this may be available but the server is not guaranteed to remain up.

  • Newer releases just have apt .deb files available for download through the github Releases: Navigate to the relevant release on the main repository page, under Releases (standard numerical ordering -- latest version is highest): https://github.com/emer/cemer/releases/

Manual .deb install Step 1: Update and get dependencies

First, become root:

$ sudo su

And install aptitude:

$ apt -y install aptitude

And update your system:

aptitude update -y

And install upgrades:

aptitude upgrade -y

Next, install libraries:

$ aptitude install -y qt5-default qttools5-dev libqt5webkit5-dev qtlocation5-dev libqt5designer5 qtdeclarative5-dev libqt5sensors5-dev qtmultimedia5-dev libqt5svg5-dev libcoin80-dev cmake g++ libreadline6-dev libgsl0-dev zlib1g-dev libpng12-dev libjpeg-dev libncurses5-dev libsvn-dev libsndfile1-dev mercurial python-pip subversion devscripts csh pkg-config libode-dev

Then install the quarter .deb package downloaded from release:

$ sudo dpkg -i libquarter0_1.0-*ubuntu1_*.deb

Then install the emergent .deb package downloaded from release:

$ sudo dpkg -i emergent_*.deb

Troubleshooting and extra steps

Ensure you have the correct video driver

Follow these instructions on the Ubuntu community wiki in order to ensure you have the most advanced, up to date drivers for your particular video card.

Software OpenGL (mesa)

If you have an old video card or are running emergent on a computer without a video card you can still get it to work using a software implementation of OpenGL. It will be slower since it uses the CPU to render but it will work. First become root:

Note: As of Lucid Lynx these instructions are no longer required - it happens correctly and automatically. However, if you are running Karmic or earlier they are necessary.

$ sudo su

Next paste the following code into your terminal to install mesa:

cd /tmp
apt-get download libgl1-mesa-swx11
dpkg -x libgl1-mesa-swx11*deb libgl1-mesa-swx11
cp -r libgl1-mesa-swx11/usr/lib/* /usr/local/lib/

To complete this process, you will also need to change your library path as indicated in the section below. Before you do that, exit the root user.

$ exit

Change Your Library Path

If you are using the mesa drivers or are building from source, you will need to permanently change your path to look in /usr/local/lib before /usr/lib so that newer libraries are used.

Then paste this code into your terminal to update your library path in your ~/.bashrc file.

cat >>~/.bashrc<<Emergent
export LD_LIBRARY_PATH=/usr/local/lib:/lib:/usr/lib
Emergent

Finally, you will need to run this command to update your shell environment:

$ source ~/.bashrc

You may need to repeat these steps after upgrading your version of Ubuntu.

Add an Emergent Icon to the Startup Menu

First become root:

$ sudo su

Next paste this into your terminal:

echo Creating /usr/share/applications/Emergent.desktop K menu item
cat > /usr/share/applications/Emergent.desktop <<Emergent
[Desktop Entry]
Categories=Education;
Exec=env LD_LIBRARY_PATH=/usr/lib /usr/bin/emergent %f
GenericName=Neural Network Simulation Software
Hidden=false
Icon=/usr/share/Emergent/images/emergent_32x32.png
Icon[en_US]=/usr/share/Emergent/images/emergent_32x32.png
Name=Emergent
Name[en_US]=Emergent
StartupNotify=true
Terminal=false
Type=Application
X-KDE-SubstituteUID=false
Comment[en_US]=Neural Network Simulation Software
Comment=Neural Network Simulation Software

Emergent

echo Creating /etc/xdg/menus/emergent.menu for application menu item
cat > /etc/xdg/menus/emergent.menu <<Emergent

<Menu>
 <Menu>
  <Name>Education</Name>
  <Layout>
   <Merge type="files" />
   <Filename>Emergent.desktop</Filename>
  </Layout>
  <Include>
   <Filename>Emergent.desktop</Filename>
  </Include>
 </Menu>
</Menu>

Emergent

In KDE, you can now navigate to K Menu > Edutainment > Miscellaneous > Emergent and drag that to your panel if you like. On Gnome it shows up in Menu > Education > Emergent.

Crash in svn operation within emergent: remove kwallet integration with svn

If svn-based operations within emergent crash, try this, to disable the kwallet integration of SVN: set the following config option in your .svn/config file:

password-stores = gnome-keyring

i.e. remove kwallet from the list of password-stores

Debugging Crashes and Known Issues

Conflict with Qt4

Emergent will crash if you build it against Qt version 5 and then somehow it ends up linking Qt4 libraries at runtime. Do:

$ lldd `which emergent`

to see which libraries emergent is linking against -- if you see libQt*.4 then this is the source of the problem. Most likely culprit is the quarter library. Currently investigating how to fix.

Old apt repository install

These instructions are for installing using the grey.colorado.edu apt repository, which may not be available, and is only for older versions from 8.5.2 and earlier.

  • Become super-user:
$ sudo su
  • Add the public key to your keyring. We sign our packages so you can be sure that you are getting emergent and not malicious software. You can install without the key but it is easy to be safe.
$ apt-key adv --keyserver pgp.mit.edu --recv-key 6CD895FFA313E824

Next add emergent's repository to your system. This will update any previous entry you had for emergent, so if you have upgraded your version of Ubuntu you should run this code again. Highlight the following code, right click, and select copy. Then right click on your terminal, select paste and finally press enter.

sed -i 's/deb .*grey.colorado.edu.*$//' /etc/apt/sources.list
cat>>/etc/apt/sources.list<<Emergent
deb https://grey.colorado.edu/ubuntu $(grep CODENAME /etc/lsb-release | cut -f2 -d=) main
Emergent

You're now ready to install emergent. Just run these commands:

$ apt-get update
$ apt-get install emergent

Lastly, you should exit the root user. Just enter

$ exit

Note for Linux Mint Users: Replace the Mint release name in sources.list with the codename of Ubuntu that your Mint release is based on.

Upgrading

First become root by entering this into your terminal followed by your password:

$ sudo su

Finally update your package cache and install emergent:

$ apt-get update
$ apt-get install emergent

If you run into any problems, first uninstall emergent, and then try reinstalling it. If that doesn't fix it for you please e-mail the emergent-users mailing list.

Uninstalling

Run this code in your terminal followed by your password:

$ sudo apt-get remove emergent