Saturday, January 18, 2014
Can't locate Geo/Gpx.pm in @INC apache
Though there are many queries flowing around asking the same question. But here the error is thrown by apache instead of Perl. I am trying to create an XML Response for the client on Mac OS X Mavericks and have written the perl script as follows:
#!/usr/bin/perl -wT
use lib '/opt/local/lib/perl5/site_perl/5.16.1/Geo';
use strict;
use CGI;
use Geo::Gpx;
open (FH, "/tmp/temp/file.txt") or print ("Unable to Open File");
my $gpx = Geo::Gpx->new;
my $cgi = CGI->new;
print $cgi->header(-type=>"text/gpx",-status=>"200 OK");
my $lon;
my @arr = <FH>;
foreach(@arr){
my %waypoints;
my $var = $_;
my @lat = split(/\s+/,$var);
#@waypoints=split(/\s+/,$_);
$waypoints{$lat[0]}=$lat[1];
$waypoints{$lat[2]}=$lat[3];
$gpx->add_waypoint(\%waypoints);
}
my $xml = $gpx->xml;
print $xml;
open FILE, ">/tmp/temp/xmlfile.xml" or die $!;
print FILE $xml;
close (FILE);
close(FH);
For the apache to find the actual path of the Gpx.pm, I have used 'use lib' to show it the real path of the file. Although this script is working perfectly on command line, my apache server is throwing the following error:
[Tue Nov 26 18:34:51 2013] [error] [client 127.0.0.1] Can't locate Geo/Gpx.pm in @INC
(@INC contains: /opt/local/lib/perl5/site_perl/5.16.1/Geo /Library/Perl/5.16/darwin-thread-multi-2level
/Library/Perl/5.16 /Network/Library/Perl/5.16/darwin-thread-multi-2level /Network/Library/Perl/5.16
/Library/Perl/Updates/5.16.2 /System/Library/Perl/5.16/darwin-thread-multi-2level /System/Library/Perl/5.16
/System/Library/Perl/Extras/5.16/darwin-thread-multi-2level /System/Library/Perl/Extras/5.16 .) at /Users/Rachit/Sites/temp.pl line 7.
[Tue Nov 26 18:34:51 2013] [error] [client 127.0.0.1] BEGIN failed--compilation aborted at /Users/Rachit/Sites/temp.pl line 7.
I have used macports and have found searching through the Web that Mavericks has got perl 5.16 preinstalled. So apache may be using that and perl is using the macport installed libraries. On checking the paths mentioned by apache error_log file as I posted above, I have copied Gpx.pm in one of the libraries installed in Geo Folder but still not getting it resolved. On running 'which perl' The result
/opt/local/bin/perl
And 'which cpan' is giving
/opt/local/bin/cpan
Kindly fix this issue as I am not able to move forward because of this. And I am not so familiar with apache.
Thanks
SYSTEM CRASHED BOOTED INTO MAC OSX BASE SYSTEM WEBKIT HELP!!!!
MY SYSTEM CRASHED AFTER AN UPDATE. RAN A BACK TRACE LOG BECAUSE A GREY SCREEN BOOTED UP WITH ONLY SAFARI INSIDE. BACK TRACE LOG SHOWED A WEBKIT SAFARI OS X INSTALLED AND HAVE PERMISSIONS OVER MY STARTUP DISK REPLACING IT WITH THEIR "MAC BASE OS X SYSTEM" AS WELL AS MY RECOVERY HD TOO. HOWEVER I AM ABLE TO GET INTO DISK UTIL AND REPAIRED MY HD AND RECOVERY HD HOWEVER THE OTHER IS STILL THERE AND WILL NOT LET ME ERASE IT. IT STATES IN INFO OF THE DRIVE "NOT ALLOW OWNERS TO TURN OFF...YES". I AM IN THE SAFARI BROWSER NOW AFTER LEAVING DISK UTIL. DISK UTIL READ MY HD IS FIXED AND OK AND WILL BOOT HOWEVER I AM SCARED IT WILL ONLY BOOT INTO WHATEVER THIS WEBKIT MAC OS X BASE IS.
I'm using X-Code.
I tried following the documentation to add a library but can't seem to get it to work properly.
Saturday, November 16, 2013
how can I change the binary of live App from universal app to ipad only?
I need to change the current live App from universal to ipad only as the wrong binary was uploaded in the first instance
how can I change this?
Xcode updater's blues
I recently started teaching myself C++, with Xcode. I'm pretty new to programming, but everything was going great, until I updated Xcode from v3.2.6 to v5.0.2. Now I am completely baffled by this new interface. All the menus are different, and I cannot for the life of me get my programs to run! It just keeps saying "Build Succeeded" and then nothing happens. On Xcode 3, all I had to do was hit cmd-return and my programs would run. Now, nothing.
Please help me get my programs to run again! Thanks.
D&B information was not accepted.
I've tried enrolling into Apple Developer Program but it says my D&B information was not accepted.
Can anybody guide me through the process?
Thank you!










