Another Installation problem with Ubuntu 9.10

I’m also having problems installing mothur using Ubuntu 9.0. I used a similar process to the one Ameet Pinto used:

  1. sudo apt-get install build-essential
  2. remove readline section from the beginning of the makefile
  3. cd mothur
  4. cd Mothur.source
  5. make

Unfortunately, it doesn’t seem to make an executible file for mothur. I get the following message at the end of the make:
/usr/bin/ld: final link failed: Invalid operation
collect2: ld returned 1 exit status
make: *** [mothur] Error 1

And when I try to run it by using the “./mothur” command I get the following error:
bash: ./mothur: No such file or directory

Does anyone have some advice? This is my first time using Ubuntu so maybe there’s a change I need to make to my system?

If it helps, I got the following errors while trying to install the library before doing the make:
dmbaptista@:~/mothur$ sudo apt-get install readline
Reading package lists… Done
E: Couldn’t find package readline
dmbaptista@:~/mothur$ apt-get install libreadline-dev
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?

I don’t know if this problem is connected to the above one. I’d appreciate any advice or insight. Thanks!

-Damon

dmbaptista@:~/mothur$ sudo apt-get install readline
Reading package lists… Done
E: Couldn’t find package readline
dmbaptista@:~/mothur$ apt-get install libreadline-dev
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?

You need to add sudo to the above:

dmbaptista@:~/mothur$ sudo apt-get install libreadline-dev

./mothur is not working because it didn’t finish building because it was unable to link the readline library.

Hi Westcott,

Huh, the installations instructions don’t have a “sudo” in front of that command. I added sudo to the command line like you suggested and it looked like it downloaded and updated the libreadline-dev file (it says I have the newest version when I try to run it again). It still gave me the error on the first sudo command (where it “couldn’t find package readline”). Unfortunately, it still doesn’t seem to finish the installation. I tried adding the “-lncurses” option as the installation instructions suggested and recomplied, but no luck. Then I removed the readline option but it still didn’t finish compiling.

I still get the following error at the end of the make:
/usr/bin/ld: final link failed: Invalid operation
collect2: ld returned 1 exit status
make: *** [mothur] Error 1

Any ideas? Thanks!

-Damon

Hmmm … I just found out our IT person installed the 32-bit version of Ubuntu on my computer and I was trying to run the compile for the 64-bit version. When I did the sudo apt-get install libreadline-dev and ran the 32-bit compile, it looks like it worked. I’m going to install the 64-bit Ubuntu and give it another try. Thanks for the advice. I’ll post with the results.

-Damon

I wanted to post an update regarding my problem. It looks like installing the 64-bit version of Ubuntu cleared up the issues. Mothur seems to be running fine now. You still might want to change the installation instructions to add “sudo” in front of “apt-get install libreadline-dev” to help those of us who are linnux nubies. :slight_smile:
At least now you know the likely error someone will get if they try to install mothur using the 64-bit settings on a 32-bit operating system. Thanks for all the help.

-Damon

Damon, thanks! Go ahead and edit the wiki yourself, if you don’t mind. The intent is for it to be a community resource, not a Pat and Sarah resource.