NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

Goog morning

I'm trying to install Nominatim on my server, but script shows the following error:

ubuntu@ip-172-31-14-167:~/Nominatim-2.4.0$ ./utils/setup.php --osm-file ~/brazil-latest.osm --all --osm2pgsql-cache 18000 2>&1 | tee setup.log
**PHP Warning:  require_once(DB.php): failed to open stream: No such file or directory in /home/ubuntu/Nominatim-2.4.0/lib/db.php on line 2
PHP Fatal error:  require_once(): Failed opening required 'DB.php' (include_path='.:/usr/share/php:/usr/share/pear') in /home/ubuntu/Nominatim-2.4.0/lib/db.php on line 2
ubuntu@ip-172-31-14-167:~/Nominatim-2.4.0$**

asked 12 Nov '15, 13:35

jeancz's gravatar image

jeancz
47337
accept rate: 33%

closed 13 Nov '15, 22:31

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273

1

SOLVED.

I created a new virtual machine and reinstall all.

(13 Nov '15, 12:19) jeancz

The question has been closed for the following reason "Solved by reinstall" by Frederik Ramm 13 Nov '15, 22:31


As root, try typing

pear install DB
permanent link

answered 12 Nov '15, 14:00

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

-1

Ok, I do it, and now shows following message:

WARNING: resetting threads to 1
WARNING: resetting cache memory to 1477
Create DB
Setup DB
string(19) "pgsql://@/nominatim"
object(DB_Error)#4 (8) {
  ["error_message_prefix"]=>
  string(0) ""
  ["mode"]=>
  int(1)
  ["level"]=>
  int(1024)
  ["code"]=>
  int(-25)
  ["message"]=>
  string(29) "DB Error: extension not found"
  ["userinfo"]=>
  string(55) " [DB Error: extension not found] ** pgsql://@/nominatim"
  ["backtrace"]=>
  array(7) {
    [0]=>
    array(6) {
      ["file"]=>
      string(21) "/usr/share/php/DB.php"
      ["line"]=>
      int(967)
      ["function"]=>
      string(10) "PEAR_Error"
      ["class"]=>
      string(10) "PEAR_Error"
      ["type"]=>
      string(2) "->"
      ["args"]=>
      array(5) {
        [0]=>
        string(29) "DB Error: extension not found"
        [1]=>
        int(-25)
        [2]=>
        int(1)
        [3]=>
        int(1024)
        [4]=>
        string(32) " [DB Error: extension not found]"
      }
    }
    [1]=>
    array(7) {
      ["file"]=>
      string(23) "/usr/share/php/PEAR.php"
      ["line"]=>
      int(531)
      ["function"]=>
      string(8) "DB_Error"
      ["class"]=>
      string(8) "DB_Error"
      ["object"]=>
      *RECURSION*
      ["type"]=>
      string(2) "->"
      ["args"]=>
      array(4) {
        [0]=>
        int(-25)
        [1]=>
        int(1)
        [2]=>
        int(1024)
        [3]=>
        string(32) " [DB Error: extension not found]"
      }
    }
    [2]=>
    array(7) {
      ["file"]=>
      string(28) "/usr/share/php/DB/common.php"
      ["line"]=>
      int(1907)
      ["function"]=>
      string(10) "raiseError"
      ["class"]=>
      string(4) "PEAR"
      ["object"]=>
      object(DB_pgsql)#3 (28) {
        ["phptype"]=>
        string(5) "pgsql"
        ["dbsyntax"]=>
        string(5) "pgsql"
        ["features"]=>
        array(7) {
          ["limit"]=>
          string(5) "alter"
          ["new_link"]=>
          string(5) "4.3.0"
          ["numrows"]=>
          bool(true)
          ["pconnect"]=>
          bool(true)
          ["prepare"]=>
          bool(false)
          ["ssl"]=>
          bool(true)
          ["transactions"]=>
          bool(true)
        }
        ["errorcode_map"]=>
        array(0) {
        }
        ["connection"]=>
        NULL
        ["dsn"]=>
        array(0) {
        }
        ["autocommit"]=>
        bool(true)
        ["transaction_opcount"]=>
        int(0)
        ["affected"]=>
        int(0)
        ["row"]=>
        array(0) {
        }
        ["_num_rows"]=>
        array(0) {
        }
        ["fetchmode"]=>
        int(1)
        ["fetchmode_object_class"]=>
        string(8) "stdClass"
        ["was_connected"]=>
        NULL
        ["last_query"]=>
        string(0) ""
        ["options"]=>
        array(8) {
          ["result_buffering"]=>
          int(500)
          ["persistent"]=>
          bool(false)
          ["ssl"]=>
          bool(false)
          ["debug"]=>
          int(0)
          ["seqname_format"]=>
          string(6) "%s_seq"
          ["autofree"]=>
          bool(false)
          ["portability"]=>
          int(0)
          ["optimize"]=>
          string(11) "performance"
        }
        ["last_parameters"]=>
        array(0) {
        }
        ["prepare_tokens"]=>
        array(0) {
        }
        ["prepare_types"]=>
        array(0) {
        }
        ["prepared_queries"]=>
        array(0) {
        }
        ["_last_query_manip"]=>
        bool(false)
        ["_next_query_manip"]=>
        bool(false)
        ["_debug"]=>
        bool(false)
        ["_default_error_mode"]=>
        NULL
        ["_default_error_options"]=>
        NULL
        ["_default_error_handler"]=>
        string(0) ""
        ["_error_class"]=>
        string(8) "DB_Error"
        ["_expected_errors"]=>
        array(0) {
        }
      }
      ["type"]=>
      string(2) "->"
      ["args"]=>
      array(7) {
        [0]=>
        NULL
        [1]=>
        int(-25)
        [2]=>
        NULL
        [3]=>
        NULL
        [4]=>
        string(32) " [DB Error: extension not found]"
        [5]=>
        string(8) "DB_Error"
        [6]=>
        bool(true)
      }
    }
    [3]=>
    array(7) {
      ["file"]=>
      string(27) "/usr/share/php/DB/pgsql.php"
      ["line"]=>
      int(212)
      ["function"]=>
      string(10) "raiseError"
      ["class"]=>
      string(9) "DB_common"
      ["object"]=>
      object(DB_pgsql)#3 (28) {
        ["phptype"]=>
        string(5) "pgsql"
        ["dbsyntax"]=>
        string(5) "pgsql"
        ["features"]=>
        array(7) {
          ["limit"]=>
          string(5) "alter"
          ["new_link"]=>
          string(5) "4.3.0"
          ["numrows"]=>
          bool(true)
          ["pconnect"]=>
          bool(true)
          ["prepare"]=>
          bool(false)
          ["ssl"]=>
          bool(true)
          ["transactions"]=>
          bool(true)
        }
        ["errorcode_map"]=>
        array(0) {
        }
        ["connection"]=>
        NULL
        ["dsn"]=>
        array(0) {
        }
        ["autocommit"]=>
        bool(true)
        ["transaction_opcount"]=>
        int(0)
        ["affected"]=>
        int(0)
        ["row"]=>
        array(0) {
        }
        ["_num_rows"]=>
        array(0) {
        }
        ["fetchmode"]=>
        int(1)
        ["fetchmode_object_class"]=>
        string(8) "stdClass"
        ["was_connected"]=>
        NULL
        ["last_query"]=>
        string(0) ""
        ["options"]=>
        array(8) {
          ["result_buffering"]=>
          int(500)
          ["persistent"]=>
          bool(false)
          ["ssl"]=>
          bool(false)
          ["debug"]=>
          int(0)
          ["seqname_format"]=>
          string(6) "%s_seq"
          ["autofree"]=>
          bool(false)
          ["portability"]=>
          int(0)
          ["optimize"]=>
          string(11) "performance"
        }
        ["last_parameters"]=>
        array(0) {
        }
        ["prepare_tokens"]=>
        array(0) {
        }
        ["prepare_types"]=>
        array(0) {
        }
        ["prepared_queries"]=>
        array(0) {
        }
        ["_last_query_manip"]=>
        bool(false)
        ["_next_query_manip"]=>
        bool(false)
        ["_debug"]=>
        bool(false)
        ["_default_error_mode"]=>
        NULL
        ["_default_error_options"]=>
        NULL
        ["_default_error_handler"]=>
        string(0) ""
        ["_error_class"]=>
        string(8) "DB_Error"
        ["_expected_errors"]=>
        array(0) {
        }
      }
      ["type"]=>
      string(2) "->"
      ["args"]=>
      array(1) {
        [0]=>
        int(-25)
      }
    }
    [4]=>
    array(7) {
      ["file"]=>
      string(21) "/usr/share/php/DB.php"
      ["line"]=>
      int(557)
      ["function"]=>
      string(7) "connect"
      ["class"]=>
      string(8) "DB_pgsql"
      ["object"]=>
      object(DB_pgsql)#3 (28) {
        ["phptype"]=>
        string(5) "pgsql"
        ["dbsyntax"]=>
        string(5) "pgsql"
        ["features"]=>
        array(7) {
          ["limit"]=>
          string(5) "alter"
          ["new_link"]=>
          string(5) "4.3.0"
          ["numrows"]=>
          bool(true)
          ["pconnect"]=>
          bool(true)
          ["prepare"]=>
          bool(false)
          ["ssl"]=>
          bool(true)
          ["transactions"]=>
          bool(true)
        }
        ["errorcode_map"]=>
        array(0) {
        }
        ["connection"]=>
        NULL
        ["dsn"]=>
        array(0) {
        }
        ["autocommit"]=>
        bool(true)
        ["transaction_opcount"]=>
        int(0)
        ["affected"]=>
        int(0)
        ["row"]=>
        array(0) {
        }
        ["_num_rows"]=>
        array(0) {
        }
        ["fetchmode"]=>
        int(1)
        ["fetchmode_object_class"]=>
        string(8) "stdClass"
        ["was_connected"]=>
        NULL
        ["last_query"]=>
        string(0) ""
        ["options"]=>
        array(8) {
          ["result_buffering"]=>
          int(500)
          ["persistent"]=>
          bool(false)
          ["ssl"]=>
          bool(false)
          ["debug"]=>
          int(0)
          ["seqname_format"]=>
          string(6) "%s_seq"
          ["autofree"]=>
          bool(false)
          ["portability"]=>
          int(0)
          ["optimize"]=>
          string(11) "performance"
        }
        ["last_parameters"]=>
        array(0) {
        }
        ["prepare_tokens"]=>
        array(0) {
        }
        ["prepare_types"]=>
        array(0) {
        }
        ["prepared_queries"]=>
        array(0) {
        }
        ["_last_query_manip"]=>
        bool(false)
        ["_next_query_manip"]=>
        bool(false)
        ["_debug"]=>
        bool(false)
        ["_default_error_mode"]=>
        NULL
        ["_default_error_options"]=>
        NULL
        ["_default_error_handler"]=>
        string(0) ""
        ["_error_class"]=>
        string(8) "DB_Error"
        ["_expected_errors"]=>
        array(0) {
        }
      }
      ["type"]=>
      string(2) "->"
      ["args"]=>
      array(2) {
        [0]=>
        array(9) {
          ["phptype"]=>
          string(5) "pgsql"
          ["dbsyntax"]=>
          string(5) "pgsql"
          ["username"]=>
          string(0) ""
          ["password"]=>
          bool(false)
          ["protocol"]=>
          string(3) "tcp"
          ["hostspec"]=>
          string(0) ""
          ["port"]=>
          bool(false)
          ["socket"]=>
          bool(false)
          ["database"]=>
          string(9) "nominatim"
        }
        [1]=>
        bool(false)
      }
    }
    [5]=>
    array(6) {
      ["file"]=>
      string(39) "/home/ubuntu/Nominatim-2.4.0/lib/db.php"
      ["line"]=>
      int(7)
      ["function"]=>
      string(7) "connect"
      ["class"]=>
      string(2) "DB"
      ["type"]=>
      string(2) "::"
      ["args"]=>
      array(2) {
        [0]=>
        string(19) "pgsql://@/nominatim"
        [1]=>
        bool(false)
      }
    }
    [6]=>
    array(4) {
      ["file"]=>
      string(44) "/home/ubuntu/Nominatim-2.4.0/utils/setup.php"
      ["line"]=>
      int(112)
      ["function"]=>
      string(5) "getDB"
      ["args"]=>
      array(0) {
      }
    }
  }
  ["callback"]=>
  NULL
}
ERROR: DB Error: extension not found
DB Error: extension not found
permanent link

answered 12 Nov '15, 14:07

jeancz's gravatar image

jeancz
47337
accept rate: 33%

edited 12 Nov '15, 14:24

scai's gravatar image

scai ♦
33.3k21309459

Hey. You found a solution to the problem?

(01 Feb '16, 13:27) pmn3

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×689
×196
×118

question asked: 12 Nov '15, 13:35

question was seen: 9,591 times

last updated: 01 Feb '16, 13:27

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum