make install executes the commands listed for the target named install in ./Makefile (and the commands for any other not-yet-completed targets that install depends on - e.g. the install target usually depends on the build target(s)). As @Henrik said, these could be anything...copying files, creating directories, setting ownership and/or permissions, creating or copying initial config files, and much more.
BTW, make install and the install command are two completely different things. The former executes a Makefile target called "install". The latter is kind of a fancy version of cp on steroids that can set owner, group, permissions, and do a bunch of other stuff that is useful when installing software - install is often used by install targets in Makefiles.
Anyway, make and make install are pretty much irrelevant to what you want to do - install pre-compiled software.
To install pre-compiled software, if you have a package for your distro (e.g. a .rpm or .deb file), then use the distro packaging tools to install it - e.g. dpkg on debian/ubuntu, rpm for fedora etc. If you don't have a copy of the package yet, but it is available as a package for your distro then use apt (debian) or dnf or yum (fedora) to fetch and install it.
For pre-compiled software that isn't a proper distro package (e.g. a tar.gz containing a bunch of files), and you can't find source code or a package for it, your best option is to use a program like GNU Stow or similar.
stow makes it fairly easy to install unpackaged software and still be able to uninstall it later (e.g. to prepare for upgrading to a new version) without leaving a huge mess of orphaned files behind....which is exactly what a simple untar or cp will do.
Unmanaged software is a mess waiting to happen. Use the package tools provided by your system if at all possible. if not, use something like stow.
One other program I intended to mention when I wrote this yesterday was checkinstall, but I just couldn't remember its name until now. checkinstall makes it easy to make a functional, if less than perfect, package of any software that you would otherwise install with make install. It's not much use for binary-only pre-compiled programs (e.g. proprietary software) but can be very useful when the source is available.
Hi!
I was just about to install reuse out of curiosity for license management.
When I run dnf install reuse I get this:
$ sudo dnf install reuse Last metadata expiration check: 3:08:59 ago on lör 14 maj 2022 18:12:49. Dependencies resolved. =============================================================================================================================================================================================================================================== Package Architecture Version Repository Size =============================================================================================================================================================================================================================================== Installing: reuse noarch 0.13.0-2.fc36 fedora 363 k Installing dependencies: apt-libs x86_64 2.4.5-1.fc36 updates 1.1 M dpkg x86_64 1.21.7-1.fc36 updates 1.5 M dpkg-perl noarch 1.21.7-1.fc36 updates 259 k perl-Digest-SHA x86_64 1:6.02-480.fc36 fedora 62 k perl-Digest-SHA1 x86_64 2.13-35.fc36 fedora 52 k perl-Tie noarch 4.6-486.fc36 fedora 36 k perl-Time-Piece x86_64 1.3401-486.fc36 fedora 46 k python3-binaryornot noarch 0.4.4-10.fc36 fedora 18 k python3-boolean.py noarch 3.8-6.fc36 fedora 208 k python3-debian noarch 0.1.36-10.fc36 fedora 107 k python3-license-expression noarch 1.0-8.fc36 fedora 45 k Installing weak dependencies: dpkg-dev noarch 1.21.7-1.fc36 updates 1.2 M python3-apt x86_64 2.3.0-1.fc36 fedora 245 k [...]
It seemed weird to me that I needed perl packages and dpkg-dev when the repository contained no perl code and no references to dpkg.
Looking at the spec file I see this:
Name: reuse
Version: 0.13.0
Release: 2%{?dist}
Summary: A tool for compliance with the REUSE recommendations
License: GPLv3+ and CC-BY-SA and ASL 2.0
Url: https://github.com/fsfe/reuse-tool
Source0: %pypi_source
BuildRequires: python3 >= 3.6
[...]
BuildRequires: %{py3_dist python-debian}
BuildRequires: %{py3_dist requests}
[...]I thought BuildRequires would only be needed when building the package and not during installation. Have I missed something?
The closest equivalent would probably be to install the below packages:
sudo dnf install make automake gcc gcc-c++ kernel-devel
However, if you don't care about exact equivalence and are ok with pulling in a lot of packages you can install all the development tools and libraries with the below command.
sudo dnf groupinstall "Development Tools" "Development Libraries"
On Fedora version older than 32 you will need the following:
sudo dnf groupinstall @development-tools @development-libraries
For Fedora 23 and up to somewhere near Fedora 32. Also works in Fedora 38.
dnf install @development-tools
Installing gcc and g++ might also be needed.
Hiya everyone,
Giving linux a go and haven't been Able to steer my Googling to answer some questions.
How does the sudo dnf install XXXXX command know where to find the package to install? Does it just know to scan my downloads for the .zip/rpm etc? (I'm talking locally, not adding the github address to the string)
If I use the sudo dnf install, how can I specify it to install on a separate drive/partition?
Tell me like I'm 4, cause I'm just winging it and googling.
Thank you!
Edit: Im running nobara/fedora.
how do i install?
thanks
Well, you're running command -v, which is documented like this:
-v print a description of COMMAND similar to the `type' builtin
If you run it from the command line:
$ command -v cat /etc/debian_version
/bin/cat
So, both those variables contain the string /bin/cat, and neither one of them is empty so your ifdef is always true.
Probably you want to take out the -v.
Your error here is that variables have wrong values.
Better use wildcard to check file presence:
REDHATOS := $(wildcard /etc/redhat-release*)
DEBIANOS := $(wildcard /etc/debian_version*)
Free tip: :-)
ifneq($(DEBIANOS),)
PKG_INSTALLER := apt-get
endif
Run the command:
sudo apt-get install build-essential
Chances are you will need things like gcc to actually do the building so you might as well install those as well. The build-essential package will install other tools used along with make.
sudo apt-get update
sudo apt-get -y install make
(-y = answer 'yes' to any prompts)
Check the installed version:
make -v