I'm trying to get a portable LaTeX installation running on a Gentoo Server. The LaTeX files are already installed.

When I try to run ./pdflatex in the path/to/texlive/bin/x86_64-linux/ I get the message exec format error: ./pdflatex. I'm running the command line with SSH with zsh.

Google told me that this could mean that I am using the wrong executable.

But when I run uname -m I get x86_64 so I thought /x86_64-linux/ contains the correct binaries.

Additionally I have tried all the other LaTeX bins for linux (i386-linux, armel-linux, armhf-linux, aarch64-linux) but none of them was working.

When get the contents with dir I can also see that there is a pdflatex file (link). Also the ls -l tells me that the file (which the pdflatex links to) has read and execute permissions for all users.

Additionally I have tried all the other LaTeX bins for linux (i386-linux, armel-linux, armhf-linux, aarch64-linux) but none of them was working.

Note: I do not have root rights so I have to use the protable installation.

How can I run the pdflatex command?

  • How did you obtain and install Latex in the 1st place? – ajeh Apr 19 '18 at 14:33
  • I installed them on a virtual kubuntu machine and moved the file to my server. This didn't work so I also installed texlive a second time via SSH. Both times I used the portable version but none of them works. It works on kubuntu though. The installation files were from the official download from texlive – miile7 Apr 19 '18 at 14:37
  • Instead if that you should get your admin to install TexLive cleanly for you. Linux is not so great these days when you try to wrestle with it. – ajeh Apr 19 '18 at 14:40
  • Getting admin rights is not possible. I am using a managed server from an external host. But isn't this the reason for offering a portable version? For not having to install it and not requiring admin rights? – miile7 Apr 19 '18 at 14:50
  • I don't know. I never used a portable Latex, but what I do know is that TexLive and MikTex work 100% of the time OOB. I run those installations for a living. Google how to get portable to work, as very few actually use that route and you are not likely to see many responses here. – ajeh Apr 19 '18 at 14:53

So I found the solution for my problem. I'm not sure if this will help anybody else. But just for completeness I post the answer here.

Even though uname -a returns x86_64 I got told that I should use objdump -a /bin/ls. This returns file format elf32-i386, so the correct binaries for me are the i386-linux binaries.

As I wrote I tested them and they did not work. The problem was that I moved the (pre-installed) files to my server using FTP with FileZilla. FileZilla offers a transfer type. This is set to automatically by default. Setting this to binary explicitly and moving the files to the server again did the trick.

Now it works.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.