Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8153309
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T15:58:28+00:00 2026-06-06T15:58:28+00:00

I’m trying to set up an apache server to show a map for FlightGear

  • 0

I’m trying to set up an apache server to show a map for FlightGear using FGMap. All the web server files for the map page are in /var/www/fgmap. It calls an fg_server_xml.cgi script, that tries to use a library at /var/www/fgmap/sg_perl/blib/lib/sgmath.pm. (Blib, for reference, is a symlink to another folder in the same directory – to /var/www/fgmap/sg_perl/blibx86-64)

fg_server_xml.cgi gives ma a 500 Internal Server Error when I try to access the page, and apache error logs show:

[Sat Jun 30 07:59:48 2012] [warn] -T switch is ignored, enable with 'PerlSwitches -T' in httpd.conf\n
[Sat Jun 30 07:59:48 2012] [error] Can't locate sgmath.pm in @INC (@INC contains: /var/www/sg_perl/blib/arch/auto/sgmath 
/var/www/sg_perl/blib/lib /etc/perl /usr/local/lib/perl/5.14.2 
/usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 
/usr/local/lib/site_perl . /etc/apache2) 
at /var/www/fgmap/fg_server_xml.cgi line 14.\nBEGIN failed--compilation aborted at /var/www/fgmap/fg_server_xml.cgi 
line 14.\n

However, I dropped another perl script, sg_test.pl into the same directory, that references the same library and runs one function from it and prints the output. This script works fine, and can find the library.

Why would one script, identical in its library calls to another and in the exact same location, be unable to find a file the other has no trouble accessing?

One of my theories is that Apache is trying to access it as a user that doesn’t have permissions or something to access the folder with sgmath.pm in it, so I made every folder/subfolder/file of WWW accessible to all users. Still no luck.

Apache can definitely use the .cgi, it’s no trouble with that, I made a test .cgi file that works just fine.

Thanks!

Edit: The library call in question

use lib "/var/www/sg_perl/blib/lib";
use lib "/var/www/sg_perl/blib/arch/auto/sgmath";
use sgmath;
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T15:58:29+00:00Added an answer on June 6, 2026 at 3:58 pm

    Using use lib, you added

    /var/www/sg_perl/blib/lib
    

    but you said the file is in

    /var/www/fgmap/sg_perl/blib/lib
    

    This latter path isn’t present in @INC (as confirmed by checking the error message).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
Basically, what I'm trying to create is a page of div tags, each has
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have thousands of HTML files to process using Groovy/Java and I need to
I'm making a simple page using Google Maps API 3. My first. One marker
I am trying to understand how to use SyndicationItem to display feed which is
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am reading a book about Javascript and jQuery and using one of the
I am trying to render a haml file in a javascript response like so:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.