Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Get TexLive to work
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
miile7
n00b
n00b


Joined: 20 Apr 2018
Posts: 4

PostPosted: Fri Apr 20, 2018 7:44 am    Post subject: Get TexLive to work Reply with quote

Hello Gentoo community,

I'm not familiar with Gentoo but I'm trying to get a portable LaTeX installation running on a Gentoo Server.

I do not have root rights so I was expecting to install the portable version. I installed all binaries on a virtual kubuntu machine and copied them to my server. I already have set up the texmf-* directories with the packages so I want to keep (and share) those. The packages have been stripped down to my absolute minimum. I tested everything on my kubuntu machine and my Windows machine (where it also has to work) and everything worked fine.

After moving the files to the Gentoo server I tried to run ./pdflatex in the path/to/texlive/bin/x86_64-linux/. But now 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. So I have tried all other LaTeX bins for linux (i386-linux, armel-linux, armhf-linux, aarch64-linux) but none of them was working. I also get exec format error: ./pdflatex or no such file or directory: ./pdflatex.

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

Now I tried to install the portable TexLive on the server directly. I downloaded the sources from tug.org/texlive, uncompressed and run the perl install-tl. After installing I still get the no such file or directory: ./pdflatex error.

When get the contents with dir I can see that there is a pdflatex file (link) in all tested directries. I was changing the file permissions of the link and the file where the link was linked to. Now all of them have read and execute for all, but it still isn't working.

I have also tried to install TexLive with emerge but I get Failed to validate a sane '/dev' which I found to be caused by missing administrator rights.

How can I run the pdflatex command? Or does anyone have any idea what I can try to get it working? Or any other way to install it? If I don't need root rights I can also install a non-portable version.
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Fri Apr 20, 2018 10:48 am    Post subject: Reply with quote

What does `file ./pdflatex` say? I think what you have there is actually an i686 binary; nobody in the target audience would've noticed because Ubuntu has IA32 compatibility on by default, which is an unlikely thing on a Gentoo server for security reasons.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21635

PostPosted: Sat Apr 21, 2018 12:56 am    Post subject: Reply with quote

I suspect you considered this, but what about asking someone who has root on the server to emerge the appropriate TeX packages? That will handle dependencies, make the package available to everyone on the system, and make update management easier.
Back to top
View user's profile Send private message
miile7
n00b
n00b


Joined: 20 Apr 2018
Posts: 4

PostPosted: Thu May 03, 2018 10:25 am    Post subject: Reply with quote

Sorry for the (very) late response, I wasn't at home. And thank you for your answers.

@Hu This is our current thought too. We are trying some other things now but our ultimate fallback is contacting the server administrators and letting them do the work. Even though this solution will probably work I am still interested in finding out what is causing the problem. Just for personal learning :)

@Ant P. I don't really know what you mean with
Quote:
What does `file ./pdflatex` say?
If I have a x86 binary as you are mentioning, why is it not working? As I wrote (I think) my server runs a x86 OS so I was expecting it to work. Also I tried the 32 bit binary (i386-linux binary) and it wasn't working too.

I hope you can still help me
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21635

PostPosted: Fri May 04, 2018 2:09 am    Post subject: Reply with quote

You said your system is an x86_64 Linux, not an x86 Linux. They are different. If you are using x86_64, and you have no multilib support, then you can only run x86_64 programs, but not x86 programs. To run an x86 program, you need 32-bit libraries. However, it would be strange for perl install-tl to build 32-bit programs that you then cannot run. It would be simply wrong for perl install-tl to download prebuilt 32-bit programs that you then cannot run. Being Gentoo, it is arguably wrong for perl install-tl to download prebuilt programs of any type. Build-from-source is a major consideration on Gentoo. :)

We probably cannot help you further without more information. Start by providing the output that Ant P. requested. It might also be interesting to get the ldd output for the failed program(s).
Back to top
View user's profile Send private message
miile7
n00b
n00b


Joined: 20 Apr 2018
Posts: 4

PostPosted: Fri May 04, 2018 7:39 am    Post subject: Reply with quote

Thank you for your respond.

I did not know that there is a difference between x86_64 and x86, thank you for that.

I run the file ./pdflatex for all the binary directories. Sometimes the pdflatex is just a link to the pdftex file. The results of the command are the following, in brackets there is written which file I used:

  • aarch64-linux (pdftex): ELF 64-bit LSB shared object, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for GNU/Linux 3.7.0, BuildID[sha1]=7452925efd143fc6b30175f01e3faeaa13501a3d, stripped, with debug_info

  • armel-linux (pdftex): ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.3, for GNU/Linux 2.6.32, BuildID[sha1]=c8a151a41be233e3712fdd170d4776981f2e28c4, stripped, with debug_info

  • armhf-linux (pdflatex): ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, missing section headers

  • i386-linux (pdflatex): ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), statically linked, interpreter lib/ld-linux.so.2, missing section headers

  • x86_64-linux (pdflatex): ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, interpreter lib64/ld-linux-x86-64.so.2, missing section headers


About the perl install-tl: At the moment I think this is the only reason for my problem, the install-tl installs the wrong binaries. I also read about compiling them myself, as @Hu mentions. The problem is that I don't have any expericence with it. Also there is a (probably working) TeXLive Version for Gentoo (app-text/texlive) and I was hoping that the perl install-tl will use those binaries.

The Gentoo TeXLive would be a gread solution but i cannot use emerge because of missing root rights. Also I'm not sure if it offers the protable version. I tried to get the binaries that the .ebuild file loads but I didn't get the structure of the ebuild file and how it finds out what to take from where and put/install to where.

In the end, if there is no other way I will try to compile it myself. But because of lazyness and saving time I want to avoid this :)
Back to top
View user's profile Send private message
Zagloj
Guru
Guru


Joined: 17 Jun 2005
Posts: 344

PostPosted: Sat May 05, 2018 10:16 am    Post subject: Reply with quote

Hi, if you dont have root access, you can install texlive locally as the official web:

https://tug.org/texlive/doc.html

To sum up
Code:
cd /your/download/directory
./install-tl

It works for me, its easy and fast, and easy to update with tlmgr. After the install, dont forget to include in your path the following

PATH=/home/yourhome/texlive/X_YEAR/bin/x86_64-linux:$PATH

Hope it works, I never had a problem with that, its not the gentoo way but...

And it would be good if you have perltk support on your system.

Bye and good luck ;)
_________________
Your ideology seems to be: "I hate the fanatics, we shoud kill them all" juantxorena dixit.
Back to top
View user's profile Send private message
miile7
n00b
n00b


Joined: 20 Apr 2018
Posts: 4

PostPosted: Mon May 07, 2018 7:21 am    Post subject: Solution Reply with quote

@Zagloj thank your for answering. This is what I meant with
Quote:
Now I tried to install the portable TexLive on the server directly. I downloaded the sources from tug.org/texlive, uncompressed and run the perl install-tl. After installing I still get the no such file or directory: ./pdflatex error.

So I already did this. But still tank you for your answer. I had to use the portable installation because the (I don't know the exact names now) TEXLIVE_PATH and TEXMF_* paths were paths which I don't have access to by default. The portable installation changes this. By my problem was that it still didn't work.

But in the end I solved my problem :)

I don't know why the local (portable) installation did not work. Also while uname -m returns x86_64 a workmate told me I should run objdump -a /bin/ls. This returns elf32-i386. So the correct binaries are not the x86_64 but the i386 files.

Quote:
I installed all binaries on a virtual kubuntu machine and copied them to my server


Aditionally I moved my files with FTP FileZilla. I did not expect that to be important but FileZilla has a Transfer Type, this is set to automatically by default. My workmate told me to set this to Binary explicitly. After copying the files again the pdflatex in the i386-linux directory worked.

So thank you all for your help. I really did not expect that this would be the solution. I don't know why the install-tl did not work.

PS: I'm new to this forum, can I mark the question as solved anyhow?
Back to top
View user's profile Send private message
steveL
Watchman
Watchman


Joined: 13 Sep 2006
Posts: 5153
Location: The Peanut Gallery

PostPosted: Mon May 07, 2018 3:06 pm    Post subject: Re: Solution Reply with quote

miile7 wrote:
I'm new to this forum, can I mark the question as solved anyhow?
Yes, just edit the OP (original post/er), with the small 'edit' button in the top-right corner of the post, and add "[solved]" to the Subject, then hit Submit.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21635

PostPosted: Tue May 08, 2018 1:53 am    Post subject: Reply with quote

As a guess, perhaps the portable installer made the same mistake you did: it saw uname -m return x86_64, and decided that you should have 64-bit binaries. It then installed 64-bit binaries, because that's usually the right answer, but in your case, it was the wrong answer. In general, 32-bit chroot environments ought to be run through linux32 so that uname -m will return i686.
Code:
$ uname -m
x86_64
$ linux32 uname -m
i686
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum