## WeBWorK Main Forum

### Failed to convert TeX to PDF... epsf.sty' not found and also issues with ImageGenerator.pm

by Miguel-Angel Manrique -
Number of replies: 8
Hello all,

I am having some errors while attempting to generate hardcopies. I installed WW using the script at https://github.com/aubreyja/ww_install. I then followed these instructions to create an SSL certificate and use it with apache2. Anyway, here is the error.

I've also been getting problems with ImageGenerator.pm, and I'm starting to suspect these issues are related. Here is what that error looks like..

Ctrl+R does nothing to fix the error, but Ctrl+Shift+R does fix it. It doesn't seem like I'm running out of memory or hard disk space---per John Jones' suggestion, here are top and df -h outputs:

I wish I was less ignorant, but I can't think of anything that would be causing these errors.

I set the default viewer to MathJax, and this gets rid of the ImageGenerator.pm error, but there are still issues generating hardcopies.

Miguel
In reply to Miguel-Angel Manrique

### Re: Failed to convert TeX to PDF... epsf.sty' not found and also issues with ImageGenerator.pm

by Louis Zulli -
Is epsf.sty installed?

You may need to install an appropriate package. Not sure what OS you are using. The texlive-generic-recommended package should suffice for Ubuntu.

We had the following errors recently:

Warning: something's wrong at /opt/webwork/pg/lib/WeBWorK/PG/ImageGenerator.pm line 392.
Unable to read logfile /opt/webwork/webwork2/tmp/ImageGenerator.HM65Uz0F/equation.log at /opt/webwork/pg/lib/WeBWorK/PG/ImageGenerator.pm line 398.
cd /opt/webwork/webwork2/tmp/ImageGenerator.HM65Uz0F && /usr/bin/latex equation > latex.out 2> latex.err failed to generate a DVI file at /opt/webwork/pg/lib/WeBWorK/PG/ImageGenerator.pm line 402.
cd /opt/webwork/webwork2/tmp/ImageGenerator.HM65Uz0F && /usr/bin//dvipng -bgTransparent -D120 -q -depth equation > dvipng.out 2> dvipng.err returned non-zero status -1: Cannot allocate memory at /opt/webwork/pg/lib/WeBWorK/PG/ImageGenerator.pm line 410.
cd /opt/webwork/webwork2/tmp/ImageGenerator.u82nfmft && /usr/bin/latex equation > latex.out 2> latex.err returned non-zero status -1: Cannot allocate memory at /opt/webwork/pg/lib/WeBWorK/PG/ImageGenerator.pm line 387.
cd /opt/webwork/webwork2/tmp/ImageGenerator.u82nfmft failed at /opt/webwork/pg/lib/WeBWorK/PG/ImageGenerator.pm line 388.

I was told by our IT folks that our SELinux was preventing apache from creating temp files. A setting was changed from Enforcing to Permissive.

Not sure if any of this will help, but good luck.
In reply to Louis Zulli

### Re: Failed to convert TeX to PDF... epsf.sty' not found and also issues with ImageGenerator.pm

by Miguel-Angel Manrique -
It seems like epsf.sty wasn't installed---I installed that package and the hardcopy error message is a little different now. Indeed, I'm using Ubuntu 12.04.

I'd love to change that setting from enforcing to permissive... seems like hope!
In reply to Miguel-Angel Manrique

### Re: Failed to convert TeX to PDF... epsf.sty' not found and also issues with ImageGenerator.pm

by Alex Jordan -
We get this error too a lot. It is intermittent. See http://webwork.maa.org/moodle/mod/forum/discuss.php?d=3202

To check if yours is of the same intermittent nature, does rebooting the server make it go away (for a while)? This error has our IT people stumped. It doesn't seem to be a permissions issue or a disk space issue according to our IT people, at least not in any basic way that they can see.
In reply to Alex Jordan

### Re: Failed to convert TeX to PDF... epsf.sty' not found and also issues with ImageGenerator.pm

by Miguel-Angel Manrique -
It took a little while to find a time when students weren't on the server, so I only just now rebooted.

Here is the new error message when I tried to generate a hardcopy (too long to do screenshots):

http://pastebin.com/2tbr5pbA

Miguel
In reply to Miguel-Angel Manrique

### Re: Failed to convert TeX to PDF... epsf.sty' not found and also issues with ImageGenerator.pm

by Alexander Basyrov -
Hi Miguel,

It appears to me that PDFLaTeX is not able to load fonts. We had a somewhat similar issue when TeX on the server did not have fonts installed. For some reason in the 'newer' version of Debian the fonts did not get automatically installed with TeX itself.

Did you attempt to compile a .tex file on the server? If you run into a similar issue when attempting to compile a valid .tex file from command line on the server, it would point to some issues with TeX installation.

-- Alex
In reply to Alexander Basyrov

### Re: Failed to convert TeX to PDF... epsf.sty' not found and also issues with ImageGenerator.pm

by Miguel-Angel Manrique -
Hi

Interestingly there was no error..

Here is the .tex file I compiled: http://faculty.elac.edu/manriquem/upload/f13-m30-elliot1.tex It's a pretty basic .tex file; really only uses amsart. Should I try something fancier?

Thanks for the message Alex.

Miguel

In reply to Miguel-Angel Manrique

### Re: Failed to convert TeX to PDF... epsf.sty' not found and also issues with ImageGenerator.pm

by Michael Gage -
This page might help -- it shows you how to save and view the actual tex file that WeBWorK constructs.  You can then run it from the command line.  It is helpful to use   "sudo su webserver_user_name_here"  (switch user) so that you run the file as the webserver.  That can catch permission errors where you have permission to access tex files but the webserver does not.

In reply to Michael Gage

### Re: Failed to convert TeX to PDF... epsf.sty' not found and also issues with ImageGenerator.pm

by Miguel-Angel Manrique -
Looks like it is indeed a font issue?

I cleared out the course's tmp folder, tried to create a hardcopy, got the errors, and noticed two (?) directories showed up in the tmp folder.

Then I did this

in each directory and got an .aux and a .log file in each. The .aux files didn't say much besides \relax and a few \newlabel{tocindent-1}{0pt}, etc., but the .log files gave messages about fonts. Here are the .log files (I changed extension to .txt since my faculty webspace ignores .log):