radareorg / radare2

UNIX-like reverse engineering framework and command-line toolset
https://www.radare.org/
GNU Lesser General Public License v3.0
20.67k stars 3k forks source link

Couldnot install radare2 on Kali #18700

Closed qascade closed 3 years ago

qascade commented 3 years ago

Environment

CC      arch/EVM/EVMDisassembler.o
  CC      arch/EVM/EVMInstPrinter.o
  CC      arch/EVM/EVMMapping.o
  CC      arch/EVM/EVMModule.o
  CC      arch/MOS65XX/MOS65XXDisassembler.o
  CC      arch/MOS65XX/MOS65XXModule.o
  CC      arch/WASM/WASMDisassembler.o
  CC      arch/WASM/WASMInstPrinter.o
  CC      arch/WASM/WASMMapping.o
  CC      arch/WASM/WASMModule.o
  CC      arch/BPF/BPFDisassembler.o
  CC      arch/BPF/BPFInstPrinter.o
  CC      arch/BPF/BPFMapping.o
  CC      arch/BPF/BPFModule.o
  CC      MCInst.o
  AR      libcapstone.a
ar: creating ./libcapstone.a
gmake: *** [Makefile:54: all] Error 2

Description

I was trying to update r2. When I ran install.sh again it showed this error and now zsh is showing permission denied whenever I try to use r2. Please help.

Also, earlier before this happened. I noticed that the graph view in the Visual Mode's boundaries are broken(not straight line). Is there a fix for that?

Test

trufae commented 3 years ago

The error is before this output. Can you show the full output or scroll up?

qascade commented 3 years ago

`WARNING: Updating from remote repository hint: Pulling without specifying how to reconcile divergent branches is hint: discouraged. You can squelch this message by running one of the following hint: commands sometime before your next pull: hint: hint: git config pull.rebase false # merge (the default strategy) hint: git config pull.rebase true # rebase hint: git config pull.ff only # fast-forward only hint: hint: You can replace "git config" with "git config --global" to set a default hint: preference for all repositories. You can also pass --rebase, --no-rebase, hint: or --ff-only on the command line to override the configured default per hint: invocation. Already up to date. Building on Linux : computing number of allowed parallel jobs. Maximum allowed RAM memory per job is 150000 kB. Number of CPUs is 4 and current free RAM allows us to run 5 jobs in parallel. So, the build will run on 4 job(s). /home/kali/radare2 configure-plugins: Loading ./plugins.cfg .. configure-plugins: Generating libr/config.h configure-plugins: Generating libr/asm/d/config.inc configure-plugins: Generating libr/config.mk SHARED: io.shm STATIC: anal.6502 anal.6502_cs anal.8051 anal.amd29k anal.arc anal.arm_cs anal.arm_gnu anal.avr anal.bf anal.chip8 anal.cr16 anal.cris anal.dalvik anal.ebc anal.gb anal.h8300 anal.hexagon anal.i4004 anal.i8080 anal.java anal.m680x_cs anal.m68k_cs anal.malbolge anal.mcore anal.mips_cs anal.mips_gnu anal.msp430 anal.nios2 anal.null anal.or1k anal.pic anal.ppc_cs anal.ppc_gnu anal.pyc anal.riscv anal.riscv_cs anal.rsp anal.s390_cs anal.sh anal.snes anal.sparc_cs anal.sparc_gnu anal.tms320 anal.tricore anal.v810 anal.v850 anal.vax anal.wasm anal.ws anal.x86_cs anal.xap anal.xcore_cs anal.xtensa anal.z80 asm.6502 asm.6502_cs asm.8051 asm.amd29k asm.arc asm.arm_as asm.arm_cs asm.arm_gnu asm.arm_winedbg asm.avr asm.bf asm.chip8 asm.cr16 asm.cris_gnu asm.dalvik asm.dcpu16 asm.ebc asm.gb asm.h8300 asm.hexagon asm.hppa_gnu asm.i4004 asm.i8080 asm.java asm.lanai_gnu asm.lh5801 asm.lm32 asm.m680x_cs asm.m68k_cs asm.m68k_gnu asm.malbolge asm.mcore asm.mcs96 asm.mips_cs asm.mips_gnu asm.msp430 asm.nios2 asm.null asm.or1k asm.pic asm.ppc_as asm.ppc_cs asm.ppc_gnu asm.propeller asm.pyc asm.riscv asm.riscv_cs asm.rsp asm.s390_cs asm.s390_gnu asm.sh asm.snes asm.sparc_cs asm.sparc_gnu asm.tms320 asm.tricore asm.v810 asm.v850 asm.v850_gnu asm.vax asm.wasm asm.ws asm.x86_as asm.x86_cs asm.x86_nasm asm.x86_nz asm.xap asm.xcore_cs asm.xtensa asm.z80 bin.any bin.art bin.avr bin.bf bin.bflt bin.bios bin.bootimg bin.cgc bin.coff bin.dex bin.dmp64 bin.dol bin.dyldcache bin.elf bin.elf64 bin.fs bin.java bin.le bin.mach0 bin.mach064 bin.mbn bin.mdmp bin.menuet bin.mz bin.ne bin.nes bin.nin3ds bin.ninds bin.ningb bin.ningba bin.nro bin.nso bin.omf bin.p9 bin.pe bin.pe64 bin.pebble bin.prg bin.psxexe bin.pyc bin.qnx bin.sfc bin.smd bin.sms bin.symbols bin.te bin.vsf bin.wasm bin.xbe bin.xnu_kernelcache bin.z64 bin.zimg bin_ldr.ldr_linux bin_xtr.xtr_dyldcache bin_xtr.xtr_fatmach0 bin_xtr.xtr_pemixed bin_xtr.xtr_sep64 bp.arm bp.bf bp.mips bp.ppc bp.x86 core.a2f core.java core.sixref crypto.aes crypto.aes_cbc crypto.base64 crypto.base91 crypto.blowfish crypto.cps2 crypto.des crypto.punycode crypto.rc2 crypto.rc4 crypto.rc6 crypto.rol crypto.ror crypto.rot crypto.serpent crypto.xor debug.bf debug.bochs debug.esil debug.gdb debug.io debug.native debug.null debug.qnx debug.rap debug.winkd egg.exec egg.xor esil.dummy fs.ext2 fs.fat fs.fb fs.hfs fs.hfsplus fs.io fs.iso9660 fs.jfs fs.minix fs.ntfs fs.posix fs.r2 fs.reiserfs fs.sfs fs.tar fs.udf fs.ufs fs.xfs io.ar io.bfdbg io.bochs io.debug io.default io.fd io.gdb io.gprobe io.gzip io.http io.ihex io.mach io.malloc io.mmap io.null io.procpid io.ptrace io.qnx io.r2k io.r2pipe io.r2web io.rap io.rbuf io.self io.shm io.sparse io.tcp io.w32 io.w32dbg io.winedbg io.winkd io.zip lang.c lang.cpipe lang.pipe lang.rust lang.spp lang.v lang.vala lang.zig parse.6502_pseudo parse.arm_pseudo parse.att2intel parse.avr_pseudo parse.chip8_pseudo parse.dalvik_pseudo parse.m68k_pseudo parse.mips_pseudo parse.ppc_pseudo parse.riscv_pseudo parse.sh_pseudo parse.tms320_pseudo parse.v850_pseudo parse.wasm_pseudo parse.x86_pseudo parse.z80_pseudo cp: './plugins.cfg' and 'plugins.cfg' are the same file 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... gcc checking for dynamic library... required checking for pkg-config... /usr/bin/pkg-config checking for patch... /usr/bin/patch checking for git... /usr/bin/git checking for gperf... no checking for libmagic ... yes checking for libz ... yes checking for libzip ... yes checking for libxxhash ... no checking declaration of ADDR_NO_RANDOMIZE in sys/personality.h... yes checking declaration of GLIBC in features.h... yes checking function arc4random_uniform() in c... no checking function explicit_bzero() in c... yes checking function explicit_memset() in c... no checking function clock_nanosleep() in c... yes checking function sigaction() in c... yes checking function clock_gettime() in c... yes checking cflags -std=gnu99... yes checking for libssl ... no checking pkg-config flags for openssl... no checking version of library libuv >= 1.0.0... ok checking pkg-config flags for libuv... yes creating ./config-user.mk creating libr/include/r_userconf.h creating pkgcfg/r_io.pc creating pkgcfg/r_magic.pc creating pkgcfg/r_asm.pc creating pkgcfg/r_bin.pc creating pkgcfg/r_anal.pc creating pkgcfg/r_hash.pc creating pkgcfg/r_cons.pc creating pkgcfg/r_core.pc creating pkgcfg/r_lang.pc creating pkgcfg/r_socket.pc creating pkgcfg/r_debug.pc creating pkgcfg/r_reg.pc creating pkgcfg/r_config.pc creating pkgcfg/r_flag.pc creating pkgcfg/r_syscall.pc creating pkgcfg/r_util.pc creating pkgcfg/r_search.pc creating pkgcfg/r_bp.pc creating pkgcfg/r_parse.pc creating pkgcfg/r_fs.pc creating pkgcfg/r_egg.pc creating pkgcfg/r_crypto.pc cleaning temporally files... done

Final report:

HOST SDB

CC main.c CC cdb.c CC buffer.c CC cdb_make.c CC ls.c CC sdbht.c CC ht_uu.c CC sdb.c CC num.c CC base64.c CC match.c CC json.c CC ns.c CC lock.c CC util.c CC disk.c CC query.c CC array.c CC fmt.c CC journal.c CC text.c CC dict.c CC ht_pp.c CC ht_up.c CC ht_pu.c CC set.c CC diff.c AR libsdb.a ar: creating libsdb.a BIN sdb sdb/sdb: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=0c4aaebbdfca13ca8608018c7d3e6fdafa69b25a, for GNU/Linux 3.2.0, not stripped

TARGET SDB

CC cdb.c CC buffer.c CC cdb_make.c CC ls.c CC sdbht.c CC ht_uu.c CC sdb.c CC num.c CC base64.c CC match.c CC json.c CC ns.c CC lock.c CC util.c CC disk.c CC query.c CC fmt.c CC array.c CC journal.c CC text.c CC dict.c CC ht_pp.c CC ht_up.c CC ht_pu.c CC set.c CC diff.c AR libsdb.a ar: creating libsdb.a CC adler32.c CC crc32.c CC deflate.c CC infback.c CC inffast.c CC inflate.c CC inftrees.c CC trees.c CC zutil.c CC compress.c CC uncompr.c CC gzclose.c CC gzlib.c CC gzread.c CC gzwrite.c ar: creating libr_z.a CC zip_add.c CC zip_add_dir.c CC zip_add_entry.c CC zip_close.c CC zip_delete.c CC zip_dir_add.c CC zip_dirent.c CC zip_discard.c CC zip_entry.c CC zip_err_str.c CC zip_error.c CC zip_error_get.c CC zip_error_get_sys_type.c CC zip_error_strerror.c CC zip_error_to_str.c CC zip_extra_field.c CC zip_extra_field_api.c CC zip_fclose.c CC zip_fdopen.c CC zip_file_add.c CC zip_file_error_get.c CC zip_file_get_comment.c CC zip_file_get_offset.c CC zip_file_rename.c CC zip_file_replace.c CC zip_file_set_comment.c CC zip_file_strerror.c CC zip_filerange_crc.c CC zip_fopen.c CC zip_fopen_encrypted.c CC zip_fopen_index.c CC zip_fopen_index_encrypted.c CC zip_fread.c CC zip_get_archive_comment.c CC zip_get_archive_flag.c CC zip_get_compression_implementation.c CC zip_get_encryption_implementation.c CC zip_get_file_comment.c CC zip_get_num_entries.c CC zip_get_num_files.c CC zip_get_name.c CC zip_name_locate.c CC zip_new.c CC zip_open.c CC zip_rename.c CC zip_replace.c CC zip_set_archive_comment.c CC zip_set_archive_flag.c CC zip_set_default_password.c CC zip_set_file_comment.c CC zip_set_file_compression.c CC zip_set_name.c CC zip_source_buffer.c CC zip_source_close.c CC zip_source_crc.c CC zip_source_deflate.c CC zip_source_error.c CC zip_source_file.c CC zip_source_filep.c CC zip_source_free.c CC zip_source_function.c CC zip_source_layered.c CC zip_source_open.c CC zip_source_pkware.c CC zip_source_pop.c CC zip_source_read.c CC zip_source_stat.c CC zip_source_window.c CC zip_source_zip.c CC zip_source_zip_new.c CC zip_stat.c CC zip_stat_index.c CC zip_stat_init.c CC zip_strerror.c CC zip_string.c CC zip_unchange.c CC zip_unchange_all.c CC zip_unchange_archive.c CC zip_unchange_data.c CC zip_utf-8.c ar: creating libr_zip.a ar q librz.a zlib/adler32.o zlib/compress.o zlib/crc32.o zlib/deflate.o zlib/gzclose.o zlib/gzlib.o zlib/gzread.o zlib/gzwrite.o zlib/infback.o zlib/inffast.o zlib/inflate.o zlib/inftrees.o zlib/trees.o zlib/uncompr.o zlib/zutil.o zip/zip_add.o zip/zip_add_dir.o zip/zip_add_entry.o zip/zip_close.o zip/zip_delete.o zip/zip_dir_add.o zip/zip_dirent.o zip/zip_discard.o zip/zip_entry.o zip/zip_err_str.o zip/zip_error.o zip/zip_error_get.o zip/zip_error_get_sys_type.o zip/zip_error_strerror.o zip/zip_error_to_str.o zip/zip_extra_field.o zip/zip_extra_field_api.o zip/zip_fclose.o zip/zip_fdopen.o zip/zip_file_add.o zip/zip_file_error_get.o zip/zip_file_get_comment.o zip/zip_file_get_offset.o zip/zip_file_rename.o zip/zip_file_replace.o zip/zip_file_set_comment.o zip/zip_file_strerror.o zip/zip_filerange_crc.o zip/zip_fopen.o zip/zip_fopen_encrypted.o zip/zip_fopen_index.o zip/zip_fopen_index_encrypted.o zip/zip_fread.o zip/zip_get_archive_comment.o zip/zip_get_archive_flag.o zip/zip_get_compression_implementation.o zip/zip_get_encryption_implementation.o zip/zip_get_file_comment.o zip/zip_get_name.o zip/zip_get_num_entries.o zip/zip_get_num_files.o zip/zip_name_locate.o zip/zip_new.o zip/zip_open.o zip/zip_rename.o zip/zip_replace.o zip/zip_set_archive_comment.o zip/zip_set_archive_flag.o zip/zip_set_default_password.o zip/zip_set_file_comment.o zip/zip_set_file_compression.o zip/zip_set_name.o zip/zip_source_buffer.o zip/zip_source_close.o zip/zip_source_crc.o zip/zip_source_deflate.o zip/zip_source_error.o zip/zip_source_file.o zip/zip_source_filep.o zip/zip_source_free.o zip/zip_source_function.o zip/zip_source_layered.o zip/zip_source_open.o zip/zip_source_pkware.o zip/zip_source_pop.o zip/zip_source_read.o zip/zip_source_stat.o zip/zip_source_window.o zip/zip_source_zip.o zip/zip_source_zip_new.o zip/zip_stat.o zip/zip_stat_index.o zip/zip_stat_init.o zip/zip_strerror.o zip/zip_string.o zip/zip_unchange.o zip/zip_unchange_all.o zip/zip_unchange_archive.o zip/zip_unchange_data.o zip/zip_utf-8.o ar: creating librz.a ranlib librz.a CC spp.c CC binheap.c CC mem.c CC unum.c CC str.c CC hex.c CC file.c CC range.c CC charset.c CC prof.c CC cache.c CC sys.c CC buf.c CC sys_w32.c CC ubase64.c CC base85.c CC base91.c CC list.c CC flist.c CC chmod.c CC graph.c CC event.c CC alloc.c CC donut.c CC print_code.c CC regcomp.c CC regerror.c CC regexec.c CC uleb128.c CC sandbox.c CC calc.c CC thread.c CC thread_sem.c CC thread_lock.c CC thread_cond.c CC strpool.c CC bitmap.c CC time.c CC format.c CC pie.c CC print.c CC utype.c CC seven.c CC randomart.c CC zip.c CC debruijn.c CC log.c CC getopt.c CC table.c CC utf8.c CC utf16.c CC utf32.c CC strbuf.c CC lib.c CC name.c CC spaces.c CC signal.c CC syscmd.c CC udiff.c CC bdiff.c CC stack.c CC queue.c CC tree.c CC idpool.c CC assert.c CC punycode.c CC pkcs7.c CC x509.c CC asn1.c CC astr.c CC json_parser.c CC json_indent.c CC skiplist.c CC pj.c CC rbtree.c CC intervaltree.c CC qrcode.c CC vector.c CC skyline.c CC str_constpool.c CC str_trim.c CC ascii_table.c CC protobuf.c CC graph_drawable.c CC axml.c CC big.c LD libr_util.so CC socket.c CC socket_proc.c CC socket_http.c CC socket_http_server.c CC socket_rap_server.c CC socket_rap_client.c CC run.c CC r2pipe.c CC socket_serial.c LD libr_socket.so

Run 'make CS_COMMIT_ARCHIVE=1' to download capstone with wget/curl instead of git

[capstone] Nothing to do CC libbochs.c CC cs.o r - src/libbochs.o ar: could not create temporary file whilst writing archive: no more archived files gmake[2]: [Makefile:43: lib/libbochs.a] Error 1 gmake[1]: [Makefile:158: bochs] Error 2 gmake[1]: Waiting for unfinished jobs.... CC utils.o CC SStream.o CC MCInstrDesc.o ar: creating libr_winkd.a CC MCRegisterInfo.o CC arch/ARM/ARMDisassembler.o CC arch/ARM/ARMInstPrinter.o CC arch/ARM/ARMMapping.o CC arch/ARM/ARMModule.o CC arch/AArch64/AArch64BaseInfo.o CC arch/AArch64/AArch64Disassembler.o CC arch/AArch64/AArch64InstPrinter.o CC arch/AArch64/AArch64Mapping.o CC arch/AArch64/AArch64Module.o CC arch/M68K/M68KDisassembler.o CC arch/M68K/M68KInstPrinter.o CC arch/M68K/M68KModule.o CC arch/Mips/MipsDisassembler.o CC arch/Mips/MipsInstPrinter.o CC arch/Mips/MipsMapping.o CC arch/Mips/MipsModule.o CC arch/PowerPC/PPCDisassembler.o CC arch/PowerPC/PPCInstPrinter.o CC arch/PowerPC/PPCMapping.o CC arch/PowerPC/PPCModule.o CC arch/RISCV/RISCVDisassembler.o CC arch/RISCV/RISCVInstPrinter.o CC arch/RISCV/RISCVMapping.o CC arch/RISCV/RISCVModule.o CC arch/Sparc/SparcDisassembler.o CC arch/Sparc/SparcInstPrinter.o CC arch/Sparc/SparcMapping.o CC arch/Sparc/SparcModule.o CC arch/SystemZ/SystemZDisassembler.o CC arch/SystemZ/SystemZInstPrinter.o CC arch/SystemZ/SystemZMapping.o CC arch/SystemZ/SystemZMCTargetDesc.o CC arch/SystemZ/SystemZModule.o CC arch/X86/X86DisassemblerDecoder.o CC arch/X86/X86Disassembler.o CC arch/X86/X86InstPrinterCommon.o CC arch/X86/X86IntelInstPrinter.o CC arch/X86/X86ATTInstPrinter.o CC arch/X86/X86Mapping.o CC arch/X86/X86Module.o CC arch/XCore/XCoreDisassembler.o CC arch/XCore/XCoreInstPrinter.o CC arch/XCore/XCoreMapping.o CC arch/XCore/XCoreModule.o CC arch/TMS320C64x/TMS320C64xDisassembler.o CC arch/TMS320C64x/TMS320C64xInstPrinter.o CC arch/TMS320C64x/TMS320C64xMapping.o CC arch/TMS320C64x/TMS320C64xModule.o CC arch/M680X/M680XDisassembler.o CC arch/M680X/M680XInstPrinter.o CC arch/M680X/M680XModule.o CC arch/EVM/EVMDisassembler.o CC arch/EVM/EVMInstPrinter.o CC arch/EVM/EVMMapping.o CC arch/EVM/EVMModule.o CC arch/MOS65XX/MOS65XXDisassembler.o CC arch/MOS65XX/MOS65XXModule.o CC arch/WASM/WASMDisassembler.o CC arch/WASM/WASMInstPrinter.o CC arch/WASM/WASMMapping.o CC arch/WASM/WASMModule.o CC arch/BPF/BPFDisassembler.o CC arch/BPF/BPFInstPrinter.o CC arch/BPF/BPFMapping.o CC arch/BPF/BPFModule.o CC MCInst.o AR libcapstone.a ar: creating ./libcapstone.a gmake: [Makefile:54: all] Error 2 `

This is the full output.

qascade commented 3 years ago

Use the tarball from the mikelloc site. The github tarballs dont contain capstone so u have to install it from outside or have network connectivity to let sys/install downlod and build it for u

On 14 Mar 2019, at 14:35, Bhuvanamitra notifications@github.com wrote:

https://www.capstone-engine.org/download.html

I have downloaded capstone from this link

If I remember correctly, I just used the makefile which came packaged with the repository.

Used make file and installed. (./make.sh ) But still the problem occurs. What am I doing wrong here?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

Originally posted by @radare in https://github.com/radareorg/radare2/issues/13372#issuecomment-472866279

I read this in a previous issue. How to get the tarball from mikelocc site

trufae commented 3 years ago

You have issues in your git copy. The first few lines complain about local changes not being able to merge. The mikelloc server is not updated anymore. You can install capstone in your system once and just make r2 use it with —with-syscapstone

qascade commented 3 years ago

I used sudo make CS_COMMIT_ARCHIVE=1 to build the rest of the stuff and it seems to have installed perfectly. But still my terminal shows.

zsh: command not found r2

trufae commented 3 years ago

you have to make install on a prefix path that it's listed in your PATH

qascade commented 3 years ago

Thank You, It is working now!