I carried out the permissions repair using disk utility. I cant do anything with Aperture because it fails to open and gives me the error message that I described in my first post. I'll go through the entire sequence of events.
1. I moved my Aperture library and all my images, from an internal drive on my iMac, 27" 2.8 i7, 12GB Ram to an external raid drive which is formatted as Mac OS x extended
Everything was working fine at this point.
2. Moved all my images from Managed files to referenced files but keeping them on the same drive, i.e. just relocated the originals
Again, this worked fine, not problems here
3. I run periodic permissions repairs on my hard drive (the MacHD drive) which I did and I think it is probably from this point that I was not able to open aperture.
4. Tried another permissions repair on the HD drive but this has not had any effect.
5. What I wanted to do next was to relocate the Aperture Library back onto a static internal drive on the imac to then use the referenced files on the external drive.
As I do not know a lot about the workings of some of this software or the system its not so easy for me to know what is relevent and what is not. I just write what I can.