6

After solving some initial problems while trying to get doxygen to work I stumbled upon the next error while following the doxygen install tutorial.
What worked so far:
git clone https://github.com/doxygen/doxygen.git
cd doxygen
mkdir build
cd build
sudo apt-get install flex (it was missing so I had to install it before cmake)
sudo apt-get install bison(it was missing so I had to install it before cmake)
cmake -G "Unix Makefiles" ..
make

But then on make install I get following error:

test@test-VirtualBox:~/doxygen/build$ make install
[  1%] Built target md5
[ 19%] Built target qtools
[ 24%] Built target vhdlparser
[ 92%] Built target _doxygen
[ 98%] Built target doxycfg
[100%] Built target doxygen
Install the project...
-- Install configuration: ""
-- Installing: /usr/local/bin/doxygen
CMake Error at src/cmake_install.cmake:42 (file):
  file INSTALL cannot copy file "/home/test/doxygen/build/bin/doxygen" to
  "/usr/local/bin/doxygen".
Call Stack (most recent call first):
  cmake_install.cmake:40 (include)



Makefile:148: recipe for target 'install' failed
make: *** [install] Error 1

What are the steps I probably need to do to get rid of this error?

Edit I checked the two paths, the first one exists and the other one has following permissions:

test@test-VirtualBox:/usr/local$ ls -la
total 44
drwxr-xr-x 11 root root 4096 Apr  2 00:03 .
drwxr-xr-x 11 root root 4096 Feb 28 19:35 ..
drwxr-xr-x  2 root root 4096 Feb 28 19:25 bin
albert
  • 8,285
  • 3
  • 19
  • 32
Cold_Class
  • 3,214
  • 4
  • 39
  • 82
  • For Ubuntu there is also a precompiled package, see doxygen.org, can you use this (should be sufficient for your initial tests)? Regarding the erro ryou checked that /home/test/doxygen/build/bin/doxygen is present and that the directory /usr/local/bin exists and is writable for you ? – albert Jun 22 '18 at 11:07
  • @albert `/home/test/doxygen/build/bin/doxygen` exists, how can I check if the other directory is writable for me? – Cold_Class Jun 22 '18 at 11:13
  • ls -ls /usr/local/bin and check the permissions. Other alternative is touch /usr/local/bin/dummy_dummy and see if this gives and error or not (when not writable and remove the file again with rm /usr/local/bin/dummy_dummy) – albert Jun 22 '18 at 11:18
  • @albert We're getting there: `test@test-VirtualBox:/usr/local$ touch /usr/local/bin/dummy_dummy touch: cannot touch '/usr/local/bin/dummy_dummy': Permission denied` – Cold_Class Jun 22 '18 at 11:19
  • 3
    As usual, use `sudo make install` for install the package into system-wide location. – Tsyvarev Jun 22 '18 at 11:19
  • @albert Thank you, it solved the problem - you can post it as an answer if you like :) – Cold_Class Jun 22 '18 at 11:21

1 Answers1

10

Regarding the installation, check also the permissions of the destination directory (default /usr/local/bin) when not the right permissions use: sudo make install

Marc Alff
  • 8,227
  • 33
  • 59
albert
  • 8,285
  • 3
  • 19
  • 32