I suppose your Makefile is properly formatted, with tabs where they should be, etc.
Then, when you run make install in the top level directory, your Makefile does have a rule to make the target install: it says to loop on your subdirectories, enter each one of them, and run make install there (this is what the -C option does). One of those sub-makes fails, most probably because, in its respective subdirectory, it doesn’t find a Makefile with an install recipe in it. When the sub-make fails, the loop goes on with the remaining sub-makes (unless the shell was instructed otherwise by means of the -e switch), and the final return code of the whole recipe will be the return code of the last sub-make.
There are some points worth discussing in your Makefile (for example, install should be listed as a .PHONY target), but you don’t provide enough information to clarify them: for example, is it really necessary to have the shell loop through the subdirectories in a particular order? Usually, a better policy is to have make parallelize the sub-makes whenever possible (and, as a side effect, have make stop when the first submake fails…)
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
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.
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.
Thanks, adding libgdal-dev to the apt install fixed it.
@tomplex That didn’t solve my problem installed libgda-dev and still getting the same problem
@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.
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?
![]()
asked Jul 4, 2021 at 16:23
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:
- From your shell, install Git using apt-get:
$ sudo apt-get update$ sudo apt-get install git- Verify the installation was successful by typing
git --version:$ git --versiongit version 2.9.2- 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 PersonRandom Person
1,4321 gold badge11 silver badges30 bronze badges
| 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 |
fairly new to debian and trying to make my first project but I keep running into errors.
Following this tutorial: https://opensource.com/article/19/2/wifi-picture-frame-raspberry-pi
Which leads to this github repo under the «building debian» section: https://github.com/nextcloud/client_theming
I did not follow the install debian section as I already have it installed with raspbian?
I ran the commands below with no error.
cmake -D OEM_THEME_DIR=$(realpath ../nextcloudtheme) -DCMAKE_INSTALL_PREFIX=/usr ../client
make
When I run the next command in the sequence «sudo make install», I receive the following error:
make: *** No rule to make target 'install'. Stop.
Within the client folder, which is where the build was created, there are these files:
CMakeCache.txt CMakeFiles cmake_install.cmake CMakeLists.txt Makefile
I have tried cd CMakeFiles and running «sudo make install» within that folder but receive the same error. From my research online, there should be a file within the client folder with the word «install» attached to it and the make command should loop through and find it. I have the install file, however this may not be the correct one? Suggestions are appreciated, thank you!