isciences / exactextract

Fast and accurate raster zonal statistics
Apache License 2.0
255 stars 33 forks source link

Install error on Ubuntu 18: No rule to make target 'install'. #6

Closed tomplex closed 5 years ago

tomplex commented 5 years ago

I attempted to install this in docker (Ubuntu 18) and when using the instructions in the README, got this error:

make: *** No rule to make target 'install'.  Stop.

Steps to reproduce:

docker run -it --entrypoint=/bin/bash ubuntu
apt update && apt install -y git build-essential cmake libgeos-dev 
git clone https://github.com/isciences/exactextract && cd exactextract
mkdir cmake-build-release && cd cmake-build-release
cmake -DCMAKE_BUILD_TYPE=Release ..
make
make install

The last command should give the error.

dbaston commented 5 years ago

make install installs the executable exactextract, but exactextract can only be built if GDAL is available. Probably a message should be printed to clarify this if cmake fails to find GDAL.

tomplex commented 5 years ago

Thanks, adding libgdal-dev to the apt install fixed it.

MohammedSalahadin commented 3 years ago

@tomplex That didn't solve my problem installed libgda-dev and still getting the same problem

tomplex commented 3 years ago

@MohammedSalahadin, this Dockerfile works for me:

FROM ubuntu:20.04

ENV DEBIAN_FRONTEND=noninteractive
RUN apt update && apt install -y \
    git \
    build-essential \
    cmake \
    libgeos-dev \
    libgdal-dev

RUN git clone https://github.com/isciences/exactextract
RUN mkdir exactextract/cmake-build-release

WORKDIR exactextract/cmake-buildrelease

RUN cmake -DCMAKE_BUILD_TYPE=Release ..
RUN make -j4 && make install

WORKDIR /
RUN rm -rf /exactextract

ENTRYPOINT ["/bin/bash"]

If you're running something similar on your system and it's failing, I don't know how to help.