Glad you solved it, the 32-bit/64-bit issue was going to be my next guess!
Dear All,
I would like to run the command-line software called STRUCTURE on a Linux server. I downloaded the package of the Linux command-line version (without graphical front end) available with this link: https://web.stanford.edu/group/pritchardlab/structure_software/release_versions/v2.3.4/release/structure_linux_console.tar.gz
After, I extracted the file with the command tar -zxvf structure_linux_console.tar.gz. This resulted in a folder called console inside of this, the program called structure. I navigated into the folder, so I'm exactly at the place of the structure file. Then, I tried to run it two different ways: (1) simply typing structure after (2) I tried ./structure but for some reason, I cannot execute the program. I also tried to use sudo for administrative privileges but nothing. Recently, someone suggested me to run it with sh, but in this case I receive the following error: structure: 1: structure: Syntax error: word unexpected (expecting ")")
I would like to ask for the help of experienced bioinformaticians to overcome this error. I greatly appreciate any help. Please note that I'm new to using linux/unix.
Best, Thend
1 answer
Dear All,
I would like to write to all person helped to solve this problem (Joe, genomax, WouterDeCoster, h.mon). Sorry, for my slow response, unfortunately, the Biostars forum does not allow me to write more than 5 messages within 6 hours, or something like this, as a new users.)
The problem is solved, someone suggested me that compatibility between the 64bit server and 32bit Structure program cause the trouble. Thus, I tried to fix this issue by doing the following steps:
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386
This immediately fixed the problem and the Structure runs simply with ./structure
I really appreciate all of your help and patient guidance. I hope this information will be useful for others facing the same or a similar problem.
Best, Thend
PS: I don't really understand this voting system... :(
I don't really understand this voting system... :(
It is really simple. If an answer/comment is helpful, people (including you) upvote (thumbs-up only, Biostars doesn't use down-voting). If an answer resolved your question, you can mark it as accepted (well technically moderators can but we prefer that original posters do that). You are able to accept more than one answer if they all work.

Log in to answer this question.
You will need to use
./structurewhile you're inside that directory, as it wont yet be in your$PATH.You probably need to make it executable with
chmod +x /path/to/structure.Otherwise, you need to tell us how/why you cannot execute the program as there could be a myriad of different reasons.
General comments:
sudowhen you don't know what the code does.shbecause someone told you to when you don't know what the code does (or is written in).Dear Joe,
I tried: chmod +x /home/.../structure but nothing happens after I tried structure but it gives me structure: command not found after I tried ./structure but still nothing. It shows -bash: ./structure: No such file or directory
chmod +xdoesn't 'visibly' do anything, it just sets the permissions on the file.You still need to use
./structurefrom within the directory that the file exists.I tried it that way (I was writing it in my question). I do everything in the folder where the software is. :(
I can download and run the software without any issue on a Linux machine with simply
./structure. You need to show us the exact errors you're getting, the file paths you're using and so on, else we can't really help.These are my commands:
could you show an ls -l of that folder?
Yes it is the following:
can you
md5sumyourstructurefile and show us the result?It should match
2fcb2fa0314005d681340f0496924924. It seems your error could be caused by a number of things, an incomplete download/transfer being one of them.endretoth : Which linux flavor are you using? I downloaded the pre-compiled executable from your link and had no issues getting it to run.
You can try installing Structure with conda, or compile from source: