JasonWard's picture

I posted the below on the Ubuntu forum, however I respost it here, because I am unsure to what extent I hitting a Turnkey issue rather than an Ubuntu issue.  For instance, it would appear that with Turnkey there is no "sudo" command, yet I can't ever remember coming across any Ubuntu documentation that doesn't expect "sudo" to be available.


I am attempting to get GeniusTrader working on Ubuntu server.
A bit of a tall order partly because the installation instructions are both sparse and out of date and because the installation instructions presume you installing on a desktop machine, however, there is no fundamental reason (that I know of) that means GeniusTrader cannot run on a headless server.
But the latest problem I have run into is GeniusTrader expects the msttcorefonts to be installed so that it can include them in the graphic images it generates.
But I don't seem to be able to install them :-( attempting to install them as per the help
		root@lamp /home/gt# apt-get install ubuntu-restricted-extras
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Couldn't find package ubuntu-restricted-extras
These instructions don't seem to make any logical sense to me.  The wiki just eventually me back to the help.  These instructions which are referred to be the GeniusTrader don't work either.
Any other ideas?  Anyone can help me?
Jeremy Davis's picture

TKL sets the root acount as the default account for login and use therefore there is no need for sudo unless you add additional users. Even then, most likely you will not want them having sudo powers so there is no real reason to have sudo installed. In fact in most instances you will not want other users to log in at all. So anytime you see instructions that use 'sudo', just remove it from the front of the line and all should be well. You're usage case here may be the exeception though, so perhaps you do want sudo? If so simply install it:

apt-get update && apt-get install sudo

Some quick research on the Ubuntu package search I found the following info. Hopefully the below should work.

To install MS core fonts you'll need to uncomment the multiverse repo first. Please note that multiverse contains files that are not open source and are community maintained (not maintained by Cannonical).

nano /etc/apt/sources.list.d/sources.list

and look for the line that ends in "multiverse". Remove the "#" from the start of it to enable the multiverse repo.

Then update the package lists:

apt-get update

and install, for the current stable TKL (v2009.10-2 - based on Ubuntu Hardy/8.04) you can install the package like this:

apt-get install msttcorefonts

in the RC release (v11.0RC - based on Ubuntu Lucid/10.04) msttcorefonts is a virtual package provided by ttf-mscorefonts-installer so install like this:

apt-get install ttf-mscorefonts-installer

Let me know how you go with it and/or if you have any further problems and I'll try to help you out.

JasonWard's picture

Thanks for that :)

That worked great for the fonts.

On the matter of sudo, I think actually you are correct and I don't need sudo for the user I have created, all I need it for at all is because, as I'm unclear how permissions get assigned when installing software I'm doing as much as I can from the created user account.

Jeremy Davis's picture

Just for clarification, it is not recommended that services running on your server run under the default root account. Most web based services will usually run by default under a limited user account (such as www-data) and for security that is the preferred way to go.

I'm certainly no expert but if you would like to discuss what you're cooking up I'm more than happy to share my 2c. Hopefully others more knowledgeable than me would also be happy to provide their perspective too.

JasonWard's picture

lol, I feel more like I'm making a witches brew frown

I don't think I'm trying to do anything that complicated, although maybe a couple of my choices made this an ambitious project.

Put simply I want a running GeniusTrader (a stock trading platform), I first learned about this from reading an article published about one of the Debian maintianers who wrote and maintained GeniusTrader until fairly recently.

I thought, cool, it should be easy to install on Ubuntu then...  *sigh* just how wrong can you be...

But anyway, having read about how GeniusTrader works, it's all command line driven and it produces outputs either to a DB, text file or graphics file.

Better and better I think, as I've been wanting a web based, programmable trading platform, and whilst GeniusTrader isn't web based I could program it to put its outputs into a web published directory and then start adding some glue around the thing to make it more web friendly.

Several other factors then come into play, I want it on a VM, not my desktop, I'd rather not have to learn to setup Apache and MySQL if I can avoid it.  I briefly programmed in PHP a few years back and really liked it, although GeniusTrader is written in Python a language I have no experience of.

So I think "Turnkey LAMP, I'm halfway there!" *sigh* how naive

I fire up Turnkey LAMP in VirtualBox and I start... but having reviewed the "first time use" instructions I decide somebody somewhere must have written down actual step by step instructions.  And lo, the Google gods provide

Only what they provide doesn't quite work, they are broken by the fact that the GeniusTrader downloads have changed, so I think OK, bite the bullet, figure it out... and I do...

However as I start into install GeniusTrader it gives me dire warnings about installing and running as root, so I roll back what I've done and go and figure out how to create a user.  An interesting experience in of itself, leading me to tickle the Google gods an awful lot, rolling back my install more than once and to asking questions here and on the Ubuntu forums.

During this time I decide I should be creating my own step by step instructions, mostly so that I can redo the work everytime I have to rollback...

Then with your help I solve the font problem that I run into, and I'm begining to think I should blog this experience and my step by step guide should others ever want to follow in my foot steps (but never having wanted to blog before, ever in my life, its still just a file one my desktop).

But I'm still running into problems, I've posted onto the GeniusTrader mail list (a very quiet place) 2 problems I'm having running the code and the one reply I've had back contains 1 peice of advice I think is mistaken in that he misunderstand what I want to do, and the other peice of advice reveals a pre-requisite that should have been installed before I installed all the Python bits (apparently) but is in fact the first mention I have found of it *sigh*

But hey... I give the install a go, just to make sure I can... result...


CPAN: File::Temp loaded ok (v0.22)

  CPAN.pm: Going to build L/LD/LDS/GD-2.45.tar.gz

Could not find gdlib-config in the search path. Please install libgd 2.0.28 or higher.
If you want to try to compile anyway, please rerun this script with the option --ignore_missing_gd.
Warning: No success on command[/usr/bin/perl Makefile.PL INSTALLDIRS=site]
Warning (usually harmless): 'YAML' not installed, will not store persistent state
  /usr/bin/perl Makefile.PL INSTALLDIRS=site -- NOT OK
Running make test
  Make had some problems, won't test
Running make install
  Make had some problems, won't install
Could not read '/home/gt/.cpan/build/GD-2.45-YKSQJZ/META.yml'. Falling back to other methods to determine prerequisites

which is where I'm at now... I did chance my arm a bit


root@lamp gt/geniustrader# apt-get install libdg
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Couldn't find package libdg
But as you can see that's not worked, so it looks like I need to tickle the Google gods some more on libdg.
I've missed out loads of twists and turns, and I've missed out some key decisions, like deciding to use BeanCounter with MySQL as its backend (well I didn't really decide, I just happened to follow that route before I knew what I was doing, but hey ho) and obviously I haven't listed by step by step instructions, but if anyone has insights, suggestions or just fancies having a go at it themselves, do say :)
Jeremy Davis's picture

I provided a link in my above post but here it is again for convienience.

apt-cache search is another useful tool. Use it from the command line like this:

apt-cache search libgd

and it will return something like this...

libgd-barcode-perl - Library to create barcode images (GD::Barcode)
libgd-gd2-perl - Perl module wrapper for libgd - gd2 variant
libgd-graph-perl - Graph Plotting Module for Perl 5
libgd-text-perl - Text utilities for use with GD
libgd2-noxpm - GD Graphics Library version 2 (without XPM support)
libgd2-noxpm-dev - GD Graphics Library version 2 (development version)
libgd2-xpm - GD Graphics Library version 2
libgd2-xpm-dev - GD Graphics Library version 2 (development version)

Perhaps libgd-gd2-perl is what you are after? 

JasonWard's picture

Sorry, yeah I missed the relevance of searching the packages, kind of assumed (without checking) that it would be above my head.

And, thanks, the libgd-gd2-perl did indeed do the trick... now of course I have more/different problems, but I will address those to the GeniusTrader mailing list.

I'm also wondering if I should install desktop ubuntu VM and attempt the install there, see what problems are clearly GeniusTrader - lack of information, vs what problems I created for myself by choosing to install on Turnkey LAMP.

Jeremy Davis's picture

I'm not really sure what you will acheive by installing Ubuntu desktop although perhaps some of the dependancies are preinstalled? Possibly not though. I guess you have GUI tools (like Synaptic) though which are pretty user friendly. Personally I still use the Ubuntu Package Search a fair bit if I'm working on a project, and I run Ubuntu 10.04 on my desktop.

Regardless, keep documenting and I'm sure you'll get there. Once you have it all sorted you could then make a TKLPatch so others could easily follow in your footsteps if they so desire. Feel free to post again if/when you get stuck. I certainly won't guarantee that I'll be able to help, but I'm usually happy to chuck my 2c in the ring :)

JasonWard's picture

I wouldn't really want to run GeniusTrader on a desktop install, I was thinking of doing the install on a desktop to give me more insight into the problems I'm having, like really, is the GeniusTrader documentation really this poor?  Or is it that TurnKey LAMP (or Ubuntu server) is missing loads of prerequisites that the GeniusTrader people just assumed would already be installed?

I'm just thinking the insight into what system errors where might teach me something.

Jeremy Davis's picture

I haven't really had much of a look at it. That is partially because the links in your first post actually all point back to this thread rather than where your info is - perhaps you could fix that so I can have a look without recreating your google searches? But the other reason is that it has minimal interest for me beyond the problem solving (which I really enjoy and the learning on a real 'job' is without equal IMO) and being able to help someone acheive their ends.

I think that here on the TKL forums (I suggest start a new thread in the 'General' section) would be a fine place to document your build and ask for help with any issues you encounter. Over on the Dev Wiki is another good place to write up documentation of this nature (although the forums are probably better place to ask for help). You can always ask elsewhere as well and just point them back to TKL if they wish to read the full story. As an example, when I built my (one and only TKLPatch so far) patch for KnowledgeTree, I found a thread in the General forum an invaluable aid for asistance. The advantage of using a  forum thread is that once you devise a TKLPatch you can attach it there too.

Anyway, I'm waffling a bit. Point is I suspect the documentation is that bad! I think that to some degree it is old, but also my brief glances at what is available seems quite generic and vague. But if you put all your info in one place then it won't be anymore! Go for gold!

JasonWard's picture

OK the OP has been fixed, sorry about that, not sure how I managed that, except I have to say I struggle with this forums markup, give me BBCode any day ;)

I've turned my installation instructions into a script, quite impressed with myself, although feeling somewhat disapointed that 20+ hours work becomes 20 lines in a script :/ and results in something that still doesn't work.

After talking to the guys at GenuisTrader and getting some good insights, I rolled back my install and found that (and I'm at a loss to explain this) installing libgd-gd2-perl no longer solves my error I've posted about it both the GeniusTrader developer list and on the Ubuntu forum although the only reply I got there is clearly just plain wrong.

It seems many have had the same problem but mostly they seem to have fixed it just be installing more and more things until it goes away (which doesn't seem right to me) or the solutions seem to involve RPM packages and things I'm not so sure about.  I'm begining to wonder if this is a bug introduced by the package maintainer.

I'll take a look at the Dev Wiki although I fear having to learning that too just to document my efforts to make something work.


JasonWard's picture

apt-get -y install libgd2-xpm-dev

Figured it from here

I wonder if it will stay fixed this time surprise

Jeremy Davis's picture

Looks like things are moving forward for you - although sounds a little painful! Just think though how many people will thank you once you have it all working!

Don't worry about posting to the dev wiki for now if you don't want. Once you have it all sorted I'll give you a hand to convert your script to a TKLPatch if you'd like. It's pretty easy, basically its an installer script with option of including overlay files (eg config files, etc).

Add new comment