-4

First I would like to say that I am new to Ubuntu and Linux.

I get an error with the make install when following the below instructions to install a Linux version of cpuminer-multi.

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

I have placed what is in the folder that gets created when I attempt to install at the end. What am I missing?


SCRIPTS USED

sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt update
sudo apt install gcc-5 g++-5 make
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 1 --slave /usr/bin/g++ g++ /usr/bin/g++-5
curl -L http://www.cmake.org/files/v3.4/cmake-3.4.1.tar.gz | tar -xvzf - -C /tmp/## Heading ##
cd /tmp/cmake-3.4.1/ && ./configure && make && sudo make install && cd -
sudo update-alternatives --install /usr/bin/cmake cmake /usr/local/bin/cmake 1 --force
sudo apt install libmicrohttpd-dev libssl-dev libhwloc-dev
git clone https://github.com/fireice-uk/xmr-stak.git
mkdir xmr-stak/build
cd xmr-stak/build
cmake ..
make install

FILES/FOLDERS GENERATED

build
CMakeLists.txt
doc
LICENSE
scripts
xmrstak
CI
CONTRIBUTING.md
Dockerfile
README.md
THIRD-PARTY-LICENSES
Zanna
  • 69,223
  • 56
  • 216
  • 327
  • The line before "make install" ? – Antonio Figueroa May 21 '18 at 13:14
  • `cmake` is like `configure`. You have to run `make` after it. – Melebius May 21 '18 at 13:14
  • Will try that. And to be sure, it should look like this: # cmake .. # sudo make # make install – Antonio Figueroa May 21 '18 at 13:17
  • @Melebius that's not usually true in my experience - if there is an `install` target, it typically depends on the default `all` target and builds that first. It also wouldn't explain the `No rule to make target 'install'` error. – steeldriver May 21 '18 at 13:21
  • 2
    @ Antonio Not `sudo make`, just `make`. `sudo` should be only applicable for the install phase. BTW do you have any `Makefile`? It should be generated by CMake. If not, check the CMake output for errors. @steeldriver You might be right. It looks like CMake did not finish successfully. – Melebius May 21 '18 at 13:28
  • @Melebius yes I think that's the more likely explanation - in particular, it seems to want CUDA and OpenCL by default so the OP may need to add `-DCUDA_ENABLE=OFF -DOpenCL_ENABLE=OFF` to the `cmake` command if these are not available on their system – steeldriver May 21 '18 at 13:33
  • Then what would cause cmake to not install correctly? And how do I fix that? – Antonio Figueroa May 21 '18 at 13:35
  • 1
    You almost certainly don't need to install cmake itself from source - use `apt` like you did for the other build tools – steeldriver May 21 '18 at 13:35
  • Forgive me, being really new to Linux, how would I use the "apt"? I normally use "apt" with other things, like "get" and so on. But I am not familiar with all the syntax "apt" can use. Could you be more specific in its use? – Antonio Figueroa May 21 '18 at 13:38
  • @AntonioFigueroa `apt-get install cmake`. In recent Ubuntu versions, you can replace the `apt-get` calls with simple `apt`. After all, [APT](https://en.wikipedia.org/wiki/APT_(Debian)) is the name of all the complex system. – Melebius May 21 '18 at 13:39
  • Yeah, cmake is broken. Should I just blow it away and reinstall Ubuntu? – Antonio Figueroa May 21 '18 at 13:46
  • The error that gets outputted is really long. I will try another version of Ubuntu to see if that helps. Sorry we did not get anywhere with this, but I will plug away till I get it down and working. – Antonio Figueroa May 21 '18 at 13:48
  • 1
    In case you hadn't noticed, you already used `apt` when you did `sudo apt install gcc-5 g++-5 make` – steeldriver May 21 '18 at 15:04
  • @AntonioFigueroa If CMake is broken, reinstall CMake. If Ubuntu is broken, reinstall Ubuntu. – Melebius May 21 '18 at 15:25

1 Answers1

3

The correct way on installation is as follows (tested on Ubuntu 16.04 LTS and 18.04 LTS):

  1. Get all needed dependencies

    sudo apt-get install cmake build-essential git libmicrohttpd-dev \
    libssl-dev libhwloc-dev
    
  2. Clone repository

    git clone https://github.com/fireice-uk/xmr-stak.git
    
  3. Configure and compile source

    cd xmr-stak
    mkdir build
    cd build
    
    # I do not have CUDA and OpenCL-capable hardware, so I disabled them
    cmake .. -DCUDA_ENABLE=OFF -DOpenCL_ENABLE=OFF 
    
    make
    
  4. Install the application

    sudo make install
    
N0rbert
  • 97,162
  • 34
  • 239
  • 423