Forum Bugs

Syntax error: "(" unexpected

jsgarvin
I'm trying to install prince 6.0r8 on a new server (Ubuntu 10.04 64bit) and getting the following error. Help?!?

$ sudo ./install.sh 
Prince 6.0

Install directory
    This is the directory in which Prince 6.0 will be installed.
    Press Enter to accept the default directory or enter an alternative.
    [/usr/local]: 

Installing Prince 6.0...
Creating directories...
Installing files...

Installation complete.
    Thank you for choosing Prince 6.0, we hope you find it useful.
    Please visit http://www.princexml.com for updates and development news.

$ prince --version
/usr/local/lib/prince/bin/prince: 1: Syntax error: "(" unexpected
jsgarvin
I should also mention that my development environment is also Ubuntu 10.04 64bit (desktop) and I was able to install prince there using the same command above just fine.

The output of 'sum' from the terminal on the /user/local/lib/prince/bin/prince binary file produce identical output locally and on the server.

Copying the locally compiled binary to the server and running it there results in the same error.

Copying the server compiled binary to my desktop and running it works fine.


I guess I must be missing some dependent library on the server, but I have no idea what that might be.
mikeday
Have you tried installing Prince 7.1 instead? There is a 64-bit Ubuntu package available.
jsgarvin
Our license is for the 6.0 version, and other than this particular issue, it's been working great for us. Being a non-profit educational organization, we try to spread our limited resources as far as possible.
jsgarvin
More info..

I get the above error when I run the binary file through the shell script in /usr/local/bin. However, If I try to run the executable directly from the command line, I get ...

-bash: ./prince: cannot execute binary file

Just to test I downloaded the 7.1 ubuntu static version of prince and tried to run it directly from the command line, and it worked.

When I searched for the "cannot execute binary file" error, I found this thread http://www.princexml.com/bb/viewtopic.php?f=4&t=2626

Based on the answer to that, I checked /proc/cpuinfo, and that confirms that we're running on an Intel processor (Intel(R) Core(TM)2 Quad CPU to be specific).
mikeday
What do you get when you run "file /usr/lib/prince/bin/prince"?

Technically we do not support 64-bit platforms for Prince 6.0, but the 32-bit packages do usually work if the "ia32-libs" package is installed.
jsgarvin
mikeday wrote:
What do you get when you run "file /usr/lib/prince/bin/prince"?


That's where I get the "cannot execute binary file" error.

mikeday wrote:
Technically we do not support 64-bit platforms for Prince 6.0, but the 32-bit packages do usually work if the "ia32-libs" package is installed.


Bummer. I thought for a moment that the ia32-libs would solve it (wasn't installed on the server, but is on my desktop). But, alas, that didn't change anything.

I got approval from our director to go ahead and buy the support contract so we can do the upgrade to 7.1, so I'll go do that now. Thanks for your help.
mikeday
Regarding the "file /usr/lib/prince/bin/prince", note that the command in question is actually called "file", and is used to identify the type of a particular file. It should say something like this:
$ file /usr/lib/prince/bin/prince
/usr/lib/prince/bin/prince: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), statically linked, for GNU/Linux 2.6.15, stripped

That way at least you can confirm that it is a valid binary.