Make no rule to make target install stop ошибка

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...

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and
privacy statement. We’ll occasionally send you account related emails.

Already on GitHub?
Sign in
to your account


Closed

tomplex opened this issue

Oct 3, 2018

· 4 comments

Comments

@tomplex

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

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

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

@MohammedSalahadin

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

@tomplex

@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.

Содержание

No rule to make target
GNUmakefile:1: *** missing separator. Stop.
Syntax error : end of file unexpected (expecting «fi»)
OLDPWD not set
@echo: command not found
-bash: make: command not found
Похожие статьи

No rule to make target

make: *** No rule to make target ‘main.cpp’, needed by ‘main.o’. Stop.

GNUmakefile:1: *** missing separator. Stop.

Если вы видите ошибку

GNUmakefile:1: *** missing separator. Stop.

Обратите внимание на GNUmakefile:1:

1 — это номер строки, в которой произошла ошибка

Возможно где-то вместо табуляции затесался пробел. Напоминаю, что в makefile отступы должны быть заданы табуляциями.

Либо таргет перечислен без двоеточия .PHONY clean вместо .PHONY: clean

Либо какая-то похожая ошибка.

Syntax error : end of file unexpected (expecting «fi»)

Если вы видите ошибку

Syntax error : end of file unexpected (expecting «fi»)

Обратите внимание на расстановку ; в конце выражений и расстановку при переносе строк.

Изучите этот

пример

и сравните со своим кодом.

OLDPWD not set

Если внутри makefile вы выполняете cd и видите ошибку

OLDPWD not set

Попробуйте сперва явно перейти в текущую директорию с помощью

CURDIR

cd $(CURDIR)

@echo: command not found

Если внутри makefile вы пытаетесь подавить вывод echo и получаете

@echo: command not found

Скорее всего echo это не первая команда в строке

НЕПРАВИЛЬНО:

if [ ! -f /home/andrei/Downloads/iso/centos_netinstall.iso ]; then
rm ./CentOS-7-x86_64-NetInstall-*;
wget -r -np «http://builder.hel.fi.ssh.com/privx-builds/latest/PrivX-master/Deliverables/» -A «CentOS-7-x86_64-NetInstall-2009.iso

-*.iso;
else
@echo «WARNING: centos_netinstall.iso already exists»;

ПРАВИЛЬНО:

@if [ ! -f /home/andrei/Downloads/iso/centos_netinstall.iso ]; then
rm ./CentOS-7-x86_64-NetInstall-*;
wget -r -np «http://builder.hel.fi.ssh.com/privx-builds/latest/PrivX-master/Deliverables/» -A «CentOS-7-x86_64-NetInstall-2009.iso

-*.iso;
else
echo «WARNING: centos_netinstall.iso already exists»;

-bash: make: command not found

Ошибка

-bash: make: command not found

Означает, что make не установлен.

Установить make в rpm системах можно с помощью yum в deb система — с помощью apt

sudo yum -y install make

sudo apt -y install make

Похожие статьи

make
Основы make
PHONY
CURDIR
shell
wget + make
Переменные в Make файлах
ifeq: Условные операторы
filter
-c: Компиляция
Linux
Bash
C
C++
C++ Header файлы
Configure make install
DevOps
Docker
OpenBSD
Errors make

I am doing an install of git on Ubuntu 20.04, according to this tutorial. I executed from «Install Git on Linux«, the Debian/Ubuntu parts. And then I get the errors:

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

at point 3 under «Build Git from source on Linux«. I am new to Linux, but it seems as though make is automatically installed. When I run:

apt list --installed

it is listed:

make/focal,now 4.2.1-1.2 amd64 [installed,automatic]

Can you help on how to take this forward or approach learning about the problem?

BeastOfCaerbannog's user avatar

asked Jul 4, 2021 at 16:23

Allstar's user avatar

1

There are multiple ways to install software in Ubuntu. You can install software using APT, Snap, Flatpak, AppImage, installing from source, etc.

As far as what I can understand, you are trying to install git from source.

I would personally not suggest new Ubuntu/Linux users to install software from source as it is a bit complex than compared to other methods.

In the article which you have mentioned, following these steps will install git using APT:

Debian / Ubuntu (apt-get)

Git packages are available via apt:

  1. From your shell, install Git using apt-get:
    $ sudo apt-get update
    
    $ sudo apt-get install git
    
  2. Verify the installation was successful by typing
    git --version:

    $ git --version
    
    git version 2.9.2
    
  3. Configure your Git username and email using the following commands, replacing Emma’s name with your own. These details will be associated with any commits that you create:
    $ git config --global user.name "Emma Paris"
    
    $ git config --global user.email "eparis@atlassian.com"
    

To know more about installing software in Ubuntu, read these:

  • https://medium.com/geekculture/5-different-ways-to-install-software-on-ubuntu-linux-14ae6b95d1d2
  • How do I install a .tar.gz (or .tar.bz2) file? (I suggest you research a bit about checkinstall.)

answered Jul 4, 2021 at 17:36

Random Person's user avatar

Random PersonRandom Person

1,4421 gold badge11 silver badges30 bronze badges

Понравилась статья? Поделить с друзьями:
  • Main file data integrity crc error
  • Main executable как исправить
  • Main error unable to locate appender serverguiconsole for logger config root
  • Make menuselect error
  • Main error unable to locate appender console for logger config root