Pavan2k4 commited on
Commit
1eea3f5
·
verified ·
1 Parent(s): d347c46

Update build.sh

Browse files
Files changed (1) hide show
  1. build.sh +25 -13
build.sh CHANGED
@@ -1,18 +1,30 @@
1
  #!/bin/bash
2
- set -e
3
 
4
  # Update package list
5
  sudo apt update
6
 
7
- # Set DEBIAN_FRONTEND to noninteractive
8
- export DEBIAN_FRONTEND=noninteractive
9
-
10
- # Install required packages
11
- sudo apt install -y aptitude
12
- sudo apt install -y libpq-dev
13
- sudo apt install -y gdal-bin
14
- sudo apt install -y libgdal-dev
15
- sudo apt install -y gdal libgdal
16
- sudo apt install -y libpq5=12.2-4
17
- sudo aptitude install -y libgdal-dev
18
- echo "Build script completed successfully."
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  #!/bin/bash
 
2
 
3
  # Update package list
4
  sudo apt update
5
 
6
+ # Install GDAL and its development files
7
+ sudo apt install -y gdal-bin libgdal-dev
8
+
9
+ # Install Python3 development files
10
+ sudo apt install -y python3-dev
11
+
12
+ # Install GDAL Python bindings
13
+ sudo apt install -y python3-gdal
14
+
15
+ # Get GDAL version
16
+ GDAL_VERSION=$(gdal-config --version)
17
+
18
+ # Install GDAL for pip with the matching version
19
+ pip install GDAL
20
+
21
+ # Create a Python script to test the installation
22
+ cat << EOF > test_osgeo.py
23
+ import osgeo
24
+ print(f"OSGEO version: {osgeo.__version__}")
25
+ EOF
26
+
27
+ # Run the test script
28
+ python3 test_osgeo.py
29
+
30
+ echo "Installation complete. If you see the OSGEO version above, the installation was successful."