# Topic on Project:Support desk

## Failed to parse (PNG conversion failed; check for correct installation of latex and dvipng (or dvips + gs + convert)):

12

HI,

We are having issue with rendering new math formula to the PNG. Please check following are the software product versions installed in our RHEL7 server.

## Installed software

Product Version
MediaWiki 1.30.0
PHP 7.1.8 (apache2handler)
MySQL 5.6.40
ICU 50.1.2

• I get this error message for almost everything I try when writing math expressions: "Failed to parse (PNG conversion failed; check for correct installation of latex and dvipng (or dvips + gs + convert)): \frac{1}{4}=0.25 The above error occur when I use the math formula : $\frac{1}{4}=0.25$

Also we are having with following packages installed in our server.

-rwxr-xr-x 1 root root  16288 Jan 12  2017 /usr/bin/convert

-rwxr-xr-x 1 root root 107728 Apr 27  2010 /usr/bin/dvipng

-rwxr-xr-x 1 root root 208000 Aug 28  2015 /usr/bin/dvips

-rwxr-xr-x 1 root root  19128 Nov 26 19:00 /usr/bin/gs

-rwxr-xr-x 1 root root 666360 Aug 28  2015 /usr/bin/latex

Could you pls let us know what is the actual issue need to fix this error?

Sanjay

Turn on your debug log and look for how latex is invoked. See if you can find out what is happening, perhaps by invoking LaTeX yourself.

If you need help with the debug log, post here.

This post was hidden by 103.7.39.59 (history)

Is it possible for you to run the following command on the webserver at the command line:

/data/www/html/wiki/extensions/Math/math/texvc /tmp /tmp '\frac{1}{4}=0.25' \
'UTF-8' 'transparent'


When I run a similar command I get a file (4aa6d61810cebc0359ac2bb3f2606a62.png) in the /tmp directory.

I ran the above command, but it does not give me the .png under /tmp

Instead I got below couple of files created upon running the command in the RHEL7 server

-rw-r--r-- 1 root  root  1599 Feb 10 18:38 19950_4aa6d61810cebc0359ac2bb3f2606a62.log

-rw-r--r-- 1 root  root   140 Feb 10 18:38 19950_4aa6d61810cebc0359ac2bb3f2606a62.tex

But besides all lines of log, I could see following line of error in the above log created under /tmp.

LaTeX Error: File cancel.sty' not found.

Looks like you're missing the CTAN cancel package. I'm betting there will be other packages as well. How did you install LaTeX?

Please check below is the extra package that I have tried to install in the server need to have the CTAN cancel package as instructed under MediaWiki Texvc

But, I see my server is already having the package. Please suggest if any other package dependency.

This system is receiving updates from RHN Classic or Red Hat Satellite.

Nothing to do

I verified for following packages have already been installed in the RHEL7 server. Nothing to do further installation

But, I don't see the cancel.sty is available in the server. Please let me know how to install for this cancel package.

texlive-collection-basic.noarch : Essential programs and files

texlive-collection-documentation-base.noarch : TeX Live documentation

texlive-collection-fontsrecommended.noarch : Recommended fonts

texlive-collection-htmlxml.noarch : HTML/SGML/XML support

texlive-collection-langcyrillic.noarch : Cyrillic

texlive-collection-latex.noarch : Basic LaTeX packages

texlive-collection-latexrecommended.noarch : LaTeX recommended packages

texlive-collection-xetex.noarch : XeTeX packages

I have installed for the below packages manually for LaTeX by searching for the related depended packages from RHEN satellite

ls -lH which gs which latex which dvips which convert which dvipng which texvc`

And, something I just thought of: is SELinux used on your host? It may be prohibiting the use of /tmp.

Reply to "Failed to parse (PNG conversion failed; check for correct installation of latex and dvipng (or dvips + gs + convert)):"