1. Home
  2. Linux
  3. Unable to generate Graphical Charts in RT [Solution]

Unable to generate Graphical Charts in RT [Solution]

All of a sudden I was not able to generate graphical charts in Request Tracker, which was working earlier! The RT log file reads as below:

[debug]: You've enabled GD, but we couldn't load the module: Can't locate GD.pm in @INC (@INC contains: /opt/rt3/bin/../local/lib /opt/rt3/local/plugins/RT-Extension-ResetPassword/lib /opt/rt3/bin/../lib /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/5.8.8 . /etc/httpd) at /opt/rt3/bin/../lib/RT/Config.pm line 365. (/opt/rt3/bin/../lib/RT/Config.pm:366)
[debug]: RT's GnuPG libraries couldn't successfully read your configured GnuPG home directory (/opt/rt3/var/data/gpg). PGP support has been disabled (/opt/rt3/bin/../lib/RT/Config.pm:380)

According to the above error message, RT is not able to locate GD library and thus the graphical charts failed to generate. In this tutorial, I’ll explain how I solved this issue.

Solution: This looks like GD libraries are not installed.

Step 1: Install GD

# perl -MCPAN -e 'install GD'

Well, the installation of GD library didn’t go well. Here’s another error message.

[error] Can't locate object method "Probe" via package "RT::Crypt::GnuPG" at /opt/rt3/bin/../lib/RT/Config.pm line 390.\n

Well, I have to install GnuPG before installing GD library.

Step 2: Install GnuPG

# perl -MCPAN -e 'install GnuPG'

After successful installation of GnuPG, encountered an another error as below:

[error] Can't locate GnuPG/Interface.pm in @INC (@INC contains: /opt/rt3/bin/../local/lib /opt/rt3/local/plugins/RT-Extension-ResetPassword/lib /opt/rt3/bin/../lib /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/5.8.8 . /etc/httpd) at /opt/rt3/bin/../lib/RT/Crypt/GnuPG.pm line 55.\nBEGIN failed--compilation aborted at /opt/rt3/bin/../lib/RT/Crypt/GnuPG.pm line 55.\nCompilation failed in require at /opt/rt3/bin/../lib/RT/Config.pm line 389.\n

To solve this error, installed GnuPG::Interface package

Step 3: Install GnuPG::Interface package

# perl -MCPAN -e 'install GnuPG::Interface'

After all these, restart the web server:

Step 4: Restart your Apache Web server

# /etc/init.d/httpd restart

Now, when accessed through web browser, the graph wasn’t showing, instead a broken image link was shown. When accessed the link, found the below error:

Error during compilation of /opt/rt3/share/html/Search/Chart:
Can't locate GD/Text.pm in @INC (@INC contains: /opt/rt3/bin/../local/lib /opt/rt3/local/plugins/RT-Extension-ResetPassword/lib /opt/rt3/bin/../lib /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/5.8.8 . /etc/httpd) at /opt/rt3/share/html/Search/Chart line 59.

It shows, GD::Text package is missing.

Step 5: Install GD::Text package

# perl -MCPAN -e 'install GD::Text'

Next, encountered the below error:

Can't locate GD/Graph/bars.pm in @INC (@INC contains: /opt/rt3/bin/../local/lib /opt/rt3/local/plugins/RT-Extension-ResetPassword/lib /opt/rt3/bin/../lib /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/5.8.8 . /etc/httpd) at /opt/rt3/share/html/Search/Chart line 65.

It shows the missing of GD::Graph::bars package

Step 6: Install GD::Graph::bars

# perl -MCPAN -e 'install GD::Graph::bars'

That’s it! After restarting the web server, the graphs were loading properly.

Updated on November 2, 2018

Was this article helpful?

Related Articles

Leave a Comment