radareorg/r2ghidra

Issue after installing r2ghidra

Closed this issue · 7 comments

Description

So when I keep the radare2 file which I've downloaded from GitHub and installed r2 from there and try to install r2ghidra then it installed without any error but when I remove the radare2 file which I've downloaded from GitHub it does not find r2ghidra installed and when i try to install it again without radare2 file it gives error like

`

$ r2pm -ci r2ghidra
Cleaning r2ghidra...
DEPENDS: r2ghidra-sleigh
Global: false
InstallationDate: Mon Feb 26 18:49:38 2024
clean Done For r2ghidra
/home/mahidsec/.local/share/radare2/r2pm/db/r2ghidra TGZ=
Cleaning up /home/mahidsec/.local/share/radare2/r2pm/git/r2ghidra...
HEAD is now at 31d8fbc Remove the retdec package because the repo is archived and abandoned
Updating 31d8fbc..8de0e3c
Fast-forward
db/muon | 3 ++-
db/r2d2 | 16 ++++++++++++++++
2 files changed, 18 insertions(+), 1 deletion(-)
create mode 100644 db/r2d2
[r2pm] Updating package database /home/mahidsec/.local/share/radare2/r2pm/db ...
Already up to date.
error: pathspec 'r2-5.5.0' did not match any file(s) known to git
Already up to date.
DEPENDS: r2ghidra-sleigh
Global: false
InstallationDate: Mon Feb 26 18:49:38 2024
Install Done For r2ghidra
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for working directories... current
using prefix '/usr/local'
checking for c++ compiler... c++
checking for cpp... cpp
checking for git... /usr/bin/git
checking for pkg-config... /usr/bin/pkg-config
Using PKGCONFIG: /usr/bin/pkg-config
checking pkg-config flags for r_core... no
This package is required
gmake: *** No rule to make target 'ghidra-native'. Stop.

`

but when I bring back radare2 file again the error is gone and r2ghidra is still accessible but if I try to open any file at first it gives an error like
ERROR: Not loading library because it has already been loaded from '/home/USERNAME/.local/share/radare2/plugins/core_ghidra.so'

Looks like you have. Multiple installations of r2ghidra. Use R_DEBUG=1 env var to see which plugins are loaded and from where and remove the system one

Also seems like the pkgconfig file is not accessible by pkg config. Something wrong is in your system/installation. How did u installed r2 and so?

Also seems like the pkgconfig file is not accessible by pkg config. Something wrong is in your system/installation. How did u installed r2 and so?

Cloned from github then executed the sys/install.sh How the instructions were in the r2 github README

But when i try to install it some time it prompts for password but when try to enter the password it executes some less command

Looks like you have. Multiple installations of r2ghidra. Use R_DEBUG=1 env var to see which plugins are loaded and from where and remove the system one

It is possible because I've tried multiple time to install it in order to see how it behaves.as far I've discovered it only worked when the cloned radare2 file presents and installed without error but when i remove the colned radare2 file it give error like that.

the default installation of r2 uses symlinks, so if you remove the source directory the symlinks are broken and thats totally expected. you can do make install instead of symstall and it will work. but usually when you install r2 from git you want to keep up with the git installation

Hey @trufae thanks for all the support. the problem has been fixed after reinstalling the r2 module. there is no more error. I think somehow the module itself was installed multiple times which cause the problem