rizinorg / rizin-pm

1 stars 3 forks source link

rz-ghidra from rz-pm failed to install rz_ghidra.h, permisison denied #10

Open dmknght opened 2 years ago

dmknght commented 2 years ago

Rizin version:

rizin 0.4.0-git @ linux-x86-64
commit: cf56eda58dd8f9011e3d336d2d73957d089e2499, build: 2022-03-19__11:08:49

rz-ghidra version (command: rz-pm install rz-ghidra)

From https://github.com/rizinorg/ghidra
 * branch                d87905747fe38d2dcd7492ed2e83bbf438b156d3 -> FETCH_HEAD
Submodule path 'ghidra/ghidra': checked out 'd87905747fe38d2dcd7492ed2e83bbf438b156d3'
Submodule path 'third-party/pugixml': checked out 'fdf02957533645069bbea7cd2ed85a3014b42cf3'

Everything built fine, but the installer can't install rz_ghidra.h to system's lib

-- Installing: /usr/local/include/rz_ghidra.h
CMake Error at cmake_install.cmake:143 (file):
  file INSTALL cannot copy file
  "/home/dmknght/.local/share/rizin/rz-pm/git/rz-ghidra/src/rz_ghidra.h" to
  "/usr/local/include/rz_ghidra.h": Permission denied.

So there are some possible solutions:

  1. Force user to run as root / sudo to make installer works
  2. Check if directory is writable, or uid == 0. If not, do not install file or install at ~/.local/share/include? (It doesn't sound like a good way imo)
thestr4ng3r commented 2 years ago

Moved to the rz-pm db since rz-ghidra does not "officially" support rz-pm anymore until the go version is ready and this is the place where the script is hosted.