Sunday, 23 October 2011

Installing Io language on Ubuntu

Since I'm new to Ubuntu and I had a hard time installing Io language, I've decided to record my steps. Hopefully I'll remember all of them and other people won't struggle as much as I did. I'm running Ubuntu 11.10.

The main problem I had was that I did not have all the dependencies needed to install Io and the installation was failing. The dependencies are yajl and libevent

If you've got then installed, you can skip the next steps.

NOTE: You will need to have cmake and make. You can install them running the following commands from the terminal:
sudo apt-get install cmake
sudo apt-get install make

Installing yajl

  1. Download yajl from here: https://github.com/lloyd/yajl/downloads
    1. In my case it was: lloyd-yajl-2.0.1-0-gf4b2b1a.zip
  2. Extract it into a folder.
  3. Open the terminal and go to the folder you extracted yajl
  4. Run the following commands
    1. mkdir build
    2. cd build
    3. cmake ..
    4. sudo make install

For more information, please check:
https://github.com/lloyd/yajl
https://github.com/lloyd/yajl/blob/master/BUILDING

Installing libevent

  1. Download libevent from here: http://libevent.org/
    1. In my case it was: libevent-2.0.15-stable.tar.gz
  2. Extract it into a folder
  3. Open the terminal and go to the folder you extracted libevent
  4. Run the following commands
    1. ./configure
    2. make
    3. sudo make install

For more information please check:
http://libevent.org/
Also check the README file inside the .tar.gz for your version

Installing Io language

You can go to the Io language website and download the language or click here to go start downloading it. As there is no Ubuntu package for that, you will be downloading the Io's source code. This will point to Steve Dekorte's version. I ended up downloading Jeremy Tregunna's version. It should work the same. Check each one is the most up-to-date.

  1. Download the Io version here: https://github.com/jeremytregunna/io/zipball/master
  2. Extract it into a folder.
  3. Open the terminal and go to the folder you extracted Io
  4. Run the following commands:
    1. mkdir build
    2. cd build
    3. cmake ..
    4. sudo make install

IMPORTANT: When running 'cmake ..', you may get a few errors. Even then, try to run 'sudo make install'. Some libraries may fail to compile because they are OS specific.

For mode information please check:
http://iolanguage.com/
https://github.com/stevedekorte/io
https://github.com/jeremytregunna/io


Updating ld.so.conf

Now we just need to update ld.so.conf so Io can be accessed from anywhere in your computer.

  1. From the terminal, type the following command: sudo gedit /etc/ld.so.conf
  2. Add the following line to the file: include /usr/local/lib
  3. Save and close the file
  4. From the terminal run the following command: sudo ldconfig

Running Io

That's it. Hopefully now you will be able to open a terminal window and type: io
You should see the Io runtime environment: Io> _

3 comments:

Robert Taylor said...

Thanks for the post Sandro, worked (mostly) like a charm.

One issue I banged my head on with Ubuntu 11.10 was downloading the latest 2011.09.12.zip tag from stevedekorte and seeing an 'undefined reference to dlopen' error when trying to build. This was raised as issue #153, and has since been resolved - so downloading the latest code works fine.

Sandro Mancuso said...

Thanks for sharing it Robert. Very helpful.

Unknown said...

worked !!! thank u ..

Post a Comment