Skip to content
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

Tip: how to avoid 'cannot create directory: /usr/local/lib/cmake/argparse' errors in Termux #351

Open
Manamama opened this issue May 5, 2024 · 0 comments

Comments

@Manamama
Copy link

Manamama commented May 5, 2024

If:

~/downloads/argparse $ uname -a
Linux localhost 4.14.186+ #1 SMP PREEMPT Thu Mar 17 16:28:22 CST 2022 aarch64 Android

and you get:

~/.../argparse/build $ cmake -P cmake_install.cmake
-- Install configuration: "RelWithDebInfo"
CMake Error at cmake_install.cmake:62 (file):
  file cannot create directory: /usr/local/lib/cmake/argparse.  Maybe need
  administrative privileges.

after the successful make, instead run it with:

~/.../argparse/build $ cmake -DCMAKE_INSTALL_PREFIX=$PREFIX -P cmake_install.cmake
-- Install configuration: "RelWithDebInfo"
-- Installing: /data/data/com.termux/files/usr/lib/cmake/argparse/argparseConfig.cmake
-- Installing: /data/data/com.termux/files/usr/include/argparse/argparse.hpp
-- Installing: /data/data/com.termux/files/usr/lib/cmake/argparse/argparseConfig-version.cmake
-- Installing: /data/data/com.termux/files/usr/lib/pkgconfig/argparse.pc
~/.../argparse/build 

It may be worth to add it somewhere to that resulting Makefile itself, as an OS check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant