LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-09-2013, 11:58 AM   #1
EnderX
Member
 
Registered: Nov 2006
Posts: 66

Rep: Reputation: 15
How to set paths used by CPAN on SuSE machine?


I have a program I built to do some work with files we receive on our FTP server (SuSE 9.0) and use them to make changes to a Postgresql database on another system. When I first ran it, I discovered that I did not have the DBD::Pg module I needed to interact with our database on it - my test server had no problems, but we didn't use postgres on the FTP server for anything previously.

Attempting to use CPAN to get the module in question returns an error, which I have attempted to copy in full (from the start of the error segment) below:

Code:
  CPAN.pm: Going to build T/TU/TURNSTEP/DBD-Pg-2.19.3.tar.gz

Configuring DBD::Pg 2.19.3
PostgreSQL version: 70304 (default port: 5432)
POSTGRES_HOME: (not set)
POSTGRES_INCLUDE: /usr/include/pgsql
POSTGRES_LIB: /usr/lib
OS: linux

****************
WARNING! DBD::Pg no longer supports versions less than 7.4.
You must upgrade PostgreSQL to a newer version.
****************

Running make test
  Make had some problems, maybe interrupted? Won't test
Running make install
  Make had some problems, maybe interrupted? Won't install
Okay, turns out the FTP machine did have a copy of Postgres 7.3 on it. I didn't think that would be a big problem - I could simply download a more up-to-date copy of postgres and install it, and things would be good.

I've done so - from source install of Postgres 8.3.23, added the path to my $PATH variable, and verified that running psql shows as version 8.3.23. However, this version of Postgres installed to a different directory than the previous one did, and I think I've managed to miss something in the path settings - I'm still getting the same error as above in CPAN when I try to download the DBD::Pg module.

What do I need to do to alter the path settings, either of my own path variable or of CPAN's path searching, to have it point to the new version of Postgres (or whatever libraries it may want from that) instead of the old one?
 
Old 02-09-2013, 12:48 PM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,838

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
probably it is a PATH settings problem (check the order also)
 
Old 02-09-2013, 01:55 PM   #3
Sergei Steshenko
Senior Member
 
Registered: May 2005
Posts: 4,481

Rep: Reputation: 454Reputation: 454Reputation: 454Reputation: 454Reputation: 454
Quote:
Originally Posted by EnderX View Post
... CPAN's path searching ...
CPAN module has nothing to do with your problem, but the module you are trying to build has everything to do with it.

You need to understand how the module you are trying to build gets needed by it paths. For example, if it can get the paths through environment variables, you'll need to set the environment variables to point to the needed locations, and then from that environment to invoke 'cpan' command.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
set different paths in makefile knobby67 Programming 2 10-08-2010 11:46 AM
set sub-directory paths knobby67 Linux - General 2 12-01-2009 07:10 PM
Want to set up Virtual Machine on either Kubuntu 9.04 or Suse 11.1 pablo27 Linux - General 5 10-06-2009 08:00 PM
How to ensure paths are set during boot greengrocer Linux - Newbie 3 04-14-2007 12:47 AM
How to set the machine name in RH7 and SuSE? concoran Linux - Networking 1 11-08-2001 11:03 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:12 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration