Steps to Reproduce the Problem
eduardo@eduardo-Inspiron-7472:~$ date
Ter Jul 30 07:46:33 -03 2019
eduardo@eduardo-Inspiron-7472:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.6 LTS
Release: 16.04
Codename: xenial
$ brew install elektra
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
==> Updated Formulae
aws-google-auth hlint ncdc spin
aws-okta hugo omniorb supervisor
cfn-lint kim-api openkim-models tesseract
conan lean-cli parallel unrtf
diamond libdazzle pdfcrack valgrind
duck liblcf png++ vitetris
exploitdb libtrace pony-stable wandio
fluxctl memcached schismtracker wxmaxima
gatsby-cli monkeysphere serverless x11vnc
gitg msitools solr
==> Downloading https://www.libelektra.org/ftp/elektra/releases/elektra-0.8.26.tar.gz
Already downloaded: /home/eduardo/.cache/Homebrew/downloads/9b3f4a8687a4ca17fbdcf3ad47b5801411ef9597313652cc087f7969622c67fe--elektra-0.8.26.tar.gz
==> cmake .. -DBINDINGS=cpp -DTOOLS=kdb; -DPLUGINS=NODEP -DCMAKE_C_FLAGS_RELEASE=-DNDEBUG -DCMAKE_CXX_FLAGS_RELEASE=-DNDEBUG -DCMAKE_INSTALL_PREFIX=/home/eduardo/.linuxbrew/Cellar/elektra/0.8.26 -DCMAKE_B
==> make install
Last 15 lines from /home/eduardo/.cache/Homebrew/Logs/elektra/02.make:
-- Installing: /home/eduardo/.linuxbrew/Cellar/elektra/0.8.26/lib/elektra/tool_exec/mountpoint-info
-- Installing: /home/eduardo/.linuxbrew/Cellar/elektra/0.8.26/lib/elektra/tool_exec/mount-list-all-files
-- Installing: /home/eduardo/.linuxbrew/Cellar/elektra/0.8.26/lib/elektra/tool_exec/check-env-dep
-- Installing: /home/eduardo/.linuxbrew/Cellar/elektra/0.8.26/lib/elektra/tool_exec/install-sh-completion
-- Installing: /usr/share/bash-completion/completions/kdb
CMake Error at scripts/cmake_install.cmake:137 (file):
file INSTALL cannot copy file
"/tmp/elektra-20190730-9068-1qp1wxo/elektra-0.8.26/scripts/kdb-bash-completion"
to "/usr/share/bash-completion/completions/kdb".
Call Stack (most recent call first):
cmake_install.cmake:48 (include)
Makefile:76: recipe for target 'install' failed
make: *** [install] Error 1
READ THIS: https://docs.brew.sh/Troubleshooting
Thank you for maintaining homebrew!
Edit the file
$HOMEBREW_PREFIX/etc/bash_completion.d/kdband change this line:to this:
And it will work.
Yes, it is okay (There is also the
kdb install-sh-completionscript to install shell completion as user.). Ideally, INSTALL_SYSTEM_FILES would be OFF if a user (non-root) installs Elektra (e.g. to home directory) and ON otherwise.The bash completion is rudimentary, currently not maintained and we currently rewrite it. Instructions were given by @sanssecours a second ago.
Sorry about that,
$HOME/.linuxbrew/binwasn’t in the PATH.