LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 07-11-2011, 12:04 PM   #1
jonathansfl
LQ Newbie
 
Registered: Dec 2010
Distribution: Ubuntu 10.04
Posts: 11

Rep: Reputation: 0
Question cannot "make USE_PGXS=1" b/c no pgxs.mk exists


Greetings
I'm using Ubuntu 10.04 LTS Server and Postgresql 8.4.8.

I'm trying to set up Cybertec's ODBC_LINK program (http://www.cybertec.at/download/odbc..._odbc_link.pdf )
so I can read MS-SQL data into my Postgresql 8.4.8 database.

Their build instructions say to Compile the module using make USE_PGXS=1.
Code:
sudo make USE_PGXS=1
sudo make install USE_PGXS=1
When I run that I get:

Quote:
postgres@dev-postgres-1:~/ODBC-Link-1.0.4$ make USE_PGXS=1
Makefile:12: /usr/lib/postgresql/8.4/lib/pgxs/src/makefiles/pgxs.mk: No such file or directory
make: *** No rule to make target `/usr/lib/postgresql/8.4/lib/pgxs/src/makefiles/pgxs.mk'. Stop.
postgres@dev-postgres-1:~/ODBC-Link-1.0.4$
I had to manually install the libpq-dev library (which informed that it replaces postgresql-dev library) and I manually created a folder for ' /usr/lib/postgresql/8.4/lib/pgxs/src/makefiles/" but I don't have a pgxs.mk file to paste into that "makefiles" folder. But apparently that installation did not install the files including /usr/lib/postgresql/8.4/lib/pgxs/src/makefiles/pgxs.mk

Why are the PGXS files / folders not automatically created for me? How can i install PGXS so that the make process succeeds?

If someone knows an easier way to read directly from a MS-SQL table or view into a Postgres function I'd love to know about it! I don't want to use MSSQL DTS as i don't have control of that server, so i can't use .csv intermediary files or that kind of strategy (i can only access 2 read-only views on their server). I'm trying to
Code:
INSERT INTO postgres_table (pg fields...) SELECT * FROM ODBCSOURCE;
I want to read from that ODBC stream directly in Postgresql, like a SELECT on Linked Servers in MSSQL-world or on a linked table in MSACCESS. That would give control over the ODBC interaction to the PG function rather than a non-DB entity.

Help!
 
Old 07-11-2011, 12:39 PM   #2
baxzius
Member
 
Registered: Jan 2010
Location: India
Distribution: ubuntu
Posts: 134
Blog Entries: 1

Rep: Reputation: 21
i hope this will be useful
http://postgresql.1045698.n5.nabble....td4551314.html
 
Old 07-11-2011, 01:21 PM   #3
jonathansfl
LQ Newbie
 
Registered: Dec 2010
Distribution: Ubuntu 10.04
Posts: 11

Original Poster
Rep: Reputation: 0
thanks, no, that is my post in the postgresql world trying to get answers to how to import data directly to Postgres from an ODBC link. Now I'm just trying to get PGXS working so I can attempt to install the ODBC-Link program.

Apparently I need to "set the PGXS environment variable" or "copy it into the contrib directory of your source code and compile it like a contrib module".
I tried
Quote:
export PATH=:/usr/bin/pg_config
but that didn't help.

Quote:
postgres@dev-postgres-1:~/ODBC-Link-1.0.4$ whereis pg_config
pg_config: /usr/bin/pg_config /usr/share/man/man1/pg_config.1.gz
postgres@dev-postgres-1:~/ODBC-Link-1.0.4$ export PATH=:/usr/bin/pg_config
postgres@dev-postgres-1:~/ODBC-Link-1.0.4$ make USE_PGXS=1
Command 'make' is available in '/usr/bin/make'
The command could not be located because '/usr/bin' is not included in the PATH environment variable.
make: command not found
postgres@dev-postgres-1:~/ODBC-Link-1.0.4$ export PATH=:/usr/bin
postgres@dev-postgres-1:~/ODBC-Link-1.0.4$ make USE_PGXS=1
Makefile:12: /usr/lib/postgresql/8.4/lib/pgxs/src/makefiles/pgxs.mk: No such file or directory
make: *** No rule to make target `/usr/lib/postgresql/8.4/lib/pgxs/src/makefiles/pgxs.mk'. Stop.
postgres@dev-postgres-1:~/ODBC-Link-1.0.4$ sudo apt-get install postgresql-dev
[sudo] password for postgres:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package postgresql-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
libpq-dev
E: Package postgresql-dev has no installation candidate
postgres@dev-postgres-1:~/ODBC-Link-1.0.4$ sudo apt-get install libpq-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
libpq-dev is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 11 not upgraded.
 
  


Reply

Tags
postgresql, ubuntu.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
So many errors when I typed the "make" and "make install" command Niceman2005 Linux - Software 23 07-22-2009 02:33 PM
glibc 2.9 "make check" fails on rt/tst-cputimer with "timer sig[12] invoked to soon" shachter Linux - Software 2 02-14-2009 01:24 PM
window maker "make" / "make install" problem xiekke Fedora 2 08-08-2007 10:55 AM
Constant errors during "make" or "make install" with SUSE 10.1 Alpha 4 TehFlyingDutchman Linux - Software 3 12-30-2005 06:25 PM
problem "make"ing gtk+ "/usr/bin/env: perl -w" caid Linux - Newbie 8 07-29-2005 04:51 AM


All times are GMT -5. The time now is 03:43 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration