pgrouting
pgrouting copied to clipboard
Update installation instructions to be more clear
Update installation instructions to be more clear
- Open a terminal:
sudo apt-get install cmake
-
Visit https://docs.pgrouting.org/dev/en/pgRouting-installation.html#get-the-sources and install postgres sources
-
To find out what version of postgis we have installed
psql --version
- Follow the instructions available at https://www.postgresql.org/download/linux/ubuntu/
sudo apt-get -y install postgresql
sudo apt-get install postgresql-server-dev-13
sudo apt-get install libboost-graph-dev
- In this case, when trying to create a test database
createdb foo, the following error emerged:
createdb: error: could not connect to database template1: FATAL: role "user" does not exist
- Then, an error with the postgres user:
psql -U postgres psql: error: FATAL: Peer authentication failed for user "postgres"
- Fix that editing the following file with vi or the editor you prefer:
`vi /etc/postgresql/13/main/pg_hba.conf`
- Once inside, change the first "peer" to "trust", save and exit
sudo service postgresql restart
- Now
psql -U postgresworks!
CREATE ROLE youruser SUPERUSER CREATEDB CREATEROLE INHERIT LOGIN PASSWORD 'yourpasword';
\q
- Now follow the Short version: https://docs.pgrouting.org/dev/en/pgRouting-installation.html#short-version
sudo apt-get install postgresql-13-postgis-3
- Then, from the root of the repository:
python3 -m venv pgr-env
source pgr-env/bin/activate
pip install -r requirements.txt
- To create the documentation:
cd build
ls
rm -rf *
cmake -DWITH_DOC=ON -DES=ON ..
make doc
- Configure your user information:
git config --global user.name "MyUser"
git config --global user.email [email protected]
Thanks for creating the issue. Will work on the installation instructions soon based on the process you made
We can improve the instruction 7. Fix that editing the following file with vi or the editor you prefer: more.
By running this command:
`vi /etc/postgresql/13/main/pg_hba.conf`
the following error occurs:
"/etc/postgresql/13/main/pg_hba.conf" [Permission Denied]
Instead we can edit with admin right as:
`sudo vi /etc/postgresql/13/main/pg_hba.conf`
or
`sudo nano /etc/postgresql/13/main/pg_hba.conf`
Now it will work fine.
We can also address this error, While Uploading Data to the database using this command:
osm2pgrouting \
> -f Bucaresti_RO.osm \
> -d city_routing \
> -U user
the following error emerged:
could not connect to server: Connection refused
Is the server running on host "localhost" (127.0.0.1) and accepting
TCP/IP connections on port 5432?
Fix that by editing this file:
sudo vi /etc/postgresql/13/main/postgresql.conf
Inside this file change:
#listen_addresses = 'localhost' to #listen_addresses = '*'
and
port = 5433 to port = 5432
Exit and run this: sudo service postgresql restart
Now, this
osm2pgrouting \
> -f Bucaresti_RO.osm \
> -d city_routing \
> -U user
will work!
@cvvergara I will like to work on this issue from tomorrow evening IST. Got an exam tomorrow so would be working on that before beginning this task.
@sbdtu5498 ok
Assigned this issue to you.
Work is to be done on develop and main branches.
The installation file is in doc/src/pgRouting-installation.rst
Start the work on the main branch.
after that you can cherry-pick to develop branch