DBD::Pgã®ã¤ã³ã¹ãã¼ã«ãPath to pg_config?ãã解決ãã
- ç°¡åç°¡åã¨æã£ã¦ããããããªãã¨ã©ã¼
$ cpanm DBD::Pg --> Working on DBD::Pg Fetching http://search.cpan.org/CPAN/authors/id/T/TU/TURNSTEP/DBD-Pg-2.18.1.tar.gz ... OK Configuring DBD-Pg-2.18.1 ... N/A ! Configure failed for DBD-Pg-2.18.1. See /home/ymko/.cpanm/build.log for details. --- build.log --- --> Working on DBD::Pg Fetching http://search.cpan.org/CPAN/authors/id/T/TU/TURNSTEP/DBD-Pg-2.18.1.tar.gz -> OK Unpacking DBD-Pg-2.18.1.tar.gz Entering DBD-Pg-2.18.1 Checking configure dependencies from META.yml Checking if you have version 0 ... Yes (0.94) Checking if you have DBI 1.52 ... Yes (1.617) Configuring DBD-Pg-2.18.1 Running Makefile.PL Configuring DBD::Pg 2.18.1 Path to pg_config? Use of uninitialized value in concatenation (.) or string at Makefile.PL line 99. Use of uninitialized value in concatenation (.) or string at Makefile.PL line 101. PostgreSQL version: 0 (default port: 0) POSTGRES_HOME: (not set) POSTGRES_INCLUDE: /include POSTGRES_LIB: /lib OS: linux The value of POSTGRES_INCLUDE points to a non-existent directory: /include Cannot build unless the directories exist, exiting.
ã©ããã pg_config ã¨ãããã¡ã¤ã«ãè¦ã¤ãããªãï¼ã¨ããããã
å®è¡ãã¡ã¤ã«ãªã©ã®é ç½®å ´æãå¤æ´ããããããå¾æ¥ã¯å¿ è¦ãªãã£ãPATHæå®ãå¿ è¦ã«ãªãã±ã¼ã¹ãããã¾ããä¸è¨ã®alternativesã¨é¢é£ãã¾ãããç¹ã«initdbãpg_ctlã"/usr/bin"é ä¸ã«ãããã¨ãæå¾ ãã¦ããç°å¢ã§ã¯ã"/usr/pgsql-m.n/bin"ãªã©ã¸ã®PATHãbashrcãªã©ã¸è¨è¿°ããã¨è¯ãã§ãããã
http://lets.postgresql.jp/documents/tutorial/new_rpm
- ãªãã»ã©ãä»åº¦ã¯ãã¾ãããã»ã»ã»ãªã
$ echo "PATH=$PATH:/usr/pgsql-9.1/bin" >> ~/.bashrc $ source ~/.bashrc $ cpanm DBD::Pg --> Working on DBD::Pg Fetching http://search.cpan.org/CPAN/authors/id/T/TU/TURNSTEP/DBD-Pg-2.18.1.tar.gz ... OK Configuring DBD-Pg-2.18.1 ... OK Building and testing DBD-Pg-2.18.1 ... FAIL ! Installing DBD::Pg failed. See /home/ymko/.cpanm/build.log for details. --- build.log --- Pg.h:38:22: error: libpq-fe.h: No such file or directory
- develãå¿ è¦ããã.ä»åº¦ããOK
# wget http://yum.pgrpms.org/9.1/redhat/rhel-5-x86_64/postgresql91-devel-9.1.2-1PGDG.rhel5.x86_64.rpm # rpm -ivh postgresql91-devel-9.1.2-1PGDG.rhel5.x86_64.rpm $ cpanm DBD::Pg --> Working on DBD::Pg Fetching http://search.cpan.org/CPAN/authors/id/T/TU/TURNSTEP/DBD-Pg-2.18.1.tar.gz ... OK Configuring DBD-Pg-2.18.1 ... OK Building and testing DBD-Pg-2.18.1 ... OK Successfully installed DBD-Pg-2.18.1 1 distribution installed