## Installation

### No Such file or directory - ImageGenerator.pm

by Neal Caidin -
Number of replies: 3
Hi,

We just installed 2.4.0 of WeBWork on RHEL 5. The install seemed to go well. My next step was to create a test course and problem set.

I don't know if these Warnings existed before I started creating my problem set. I have created 3 fairly simple problems.

To replicate the warnings, I can click on Homework Sets, then I click on "firstset" which is the problem set I created.

I get the following Warnings:

## WeBWorK Warnings

WeBWorK has encountered warnings while processing your request. If this occured when viewing a problem, it was likely caused by an error or ambiguity in that problem. Otherwise, it may indicate a problem with the WeBWorK system itself. If you are a student, report these warnings to your professor to have them corrected. If you are a professor, please consult the warning output below for more information.

### Warning messages

• cd /opt/webwork/webwork2/tmp/ImageGenerator.lPpDxKB8 && /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 358.
• cd /opt/webwork/webwork2/tmp/ImageGenerator.lPpDxKB8 && /usr/bin/dvipng -bgTransparent -D120 -q -depth equation > dvipng.out 2> dvipng.err returned non-zero status 256: No such file or directory at /opt/webwork/pg/lib/WeBWorK/PG/ImageGenerator.pm line 364.

### Request information

 Time Wed Oct 10 17:10:50 2007 Method GET URI /webwork2/CIT-SETUP-TEST/firstset/

Any suggestions would be appreciated.

Thanks,
Neal

In reply to Neal Caidin

### Re: No Such file or directory - ImageGenerator.pm

by Michael Gage -
There are a couple of possibilities -- the most likely is that the latex program
is not at /usr/bin/latex but in some other location.

1. Running webwork2/bin/check_modules.pl will give you a list of the locations of programs such as latex, dvipng, mv and many more, plus a list of CPAN modules that should be installed. Check that the paths for say latex agrees with the path listed near the top of the global.conf file. (Eventually we'd like to have check_modules make this comparison automatically -- but we haven't gotten to it yet.) There is an even greater likelihood that the path for dvipng is /usr/local/bin/dvipng or something else. (You can also type "which dvipng" to find the address of the installed dvipng program.)

2. If the paths to the programs and files all look correct then check the permissions on the directories involved and make sure that the webserver can
create files and subdirectories in them.

3. If things are still not working there is a debugging parameter in lib/WeBWorK/Constants.pm :
# If true, don't delete temporary files
#
\$WeBWorK::ContentGenerator::Hardcopy::PreserveTempFiles = 1;


which you should set to 1. This preserves the temporary files made during the image creation process which you can inspect for additional log files, error messages and so forth.

Hope this helps.

-- Mike

In reply to Michael Gage

### Re: No Such file or directory - ImageGenerator.pm

by Neal Caidin -
Thanks Mike.

My sys admin found that it was looking for an additional latex module that was not installed by default (preview.sty). He has added this module now and it seemed to have fixed the problem.