Topic on Project:Support desk

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

14
Anu8791 (talkcontribs)

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 : <math>\frac{1}{4}=0.25</math>


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?


Thanks in Adv,

Sanjay

MarkAHershberger (talkcontribs)

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)
MarkAHershberger (talkcontribs)

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.

Anu8791 (talkcontribs)

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.

MarkAHershberger (talkcontribs)

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

Anu8791 (talkcontribs)

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.

Package 2:texlive-xltxtra-svn19809.0.5e-43.el7.noarch already installed and latest version

Nothing to do

MarkAHershberger (talkcontribs)
Anu8791 (talkcontribs)

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

MarkAHershberger (talkcontribs)
Anu8791 (talkcontribs)

Thanks for providing the package info the texlive-texmf-latex-2007-39


I could able to see the following package is available under RHEL6 server repo when I search for the package. But, I don't see in RHEL7 server repo. Please provide any inputs to make available the same package in RHEL 7 server repo as well.


# yum search texlive-texmf-latex

Loaded plugins: product-id, rhnplugin, search-disabled-repos, security, subscription-manager

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

============================================================================= N/S Matched: texlive-texmf-latex ==============================================================================

texlive-texmf-errata-latex.noarch : Errata for texlive-texmf-latex

texlive-texmf-latex.noarch : Texmf files needed for texlive-latex

Anu8791 (talkcontribs)

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`


MarkAHershberger (talkcontribs)

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

Anu8791 (talkcontribs)

SELInux is disabled for the hosts. I can't find the required CTAN cancel.sty package under RHEL7 server repo. It seems like it's archived so would you suggest any alternate method to get the macro cancel.sty ?

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