Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
emerge net-analyzer/metasploit troubles
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
brick_danger
n00b
n00b


Joined: 09 Mar 2021
Posts: 15

PostPosted: Wed Mar 10, 2021 1:25 am    Post subject: emerge net-analyzer/metasploit troubles Reply with quote

Hi all. Doing the pandemic thing, so what better to do than to build a Gentoo system?

Anyhow, I have been trying for days now to build Metasploit from the pentoo overlay, but it keeps failing with a Ruby error:

---------------------------------------------
Code:
Resolving dependencies......
Bundler could not find compatible versions for gem "concurrent-ruby":
  In Gemfile:
    metasploit-framework was resolved to 6.0.23, which depends on
      concurrent-ruby (= 1.0.5)

Could not find gem 'concurrent-ruby (= 1.0.5)', which is required by gem
'metasploit-framework', in any of the sources.

-----------------------------------------------

Output of emerge --info '=net-analyzer/metasploit-6.0.23::pentoo

------------------------------------------------

Code:
Portage 3.0.17 (python 3.8.8-final-0, default/linux/amd64/17.1/desktop, gcc-10.2.0, glibc-2.32-r8, 5.10.8-gentoo-aufs-exton-x86_64 x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-5.10.8-gentoo-aufs-exton-x86_64-x86_64-AMD_A8-6410_APU_with_AMD_Radeon_R5_Graphics-with-glibc2.2.5
KiB Mem:    15326640 total,   6110392 free
KiB Swap:   16902424 total,  16900228 free
Timestamp of repository gentoo: Mon, 08 Mar 2021 23:30:02 +0000
Head commit of repository gentoo: f0f7cf786d452caa6046a09a643d0bf02dc76a6a
sh bash 5.1_p4
ld GNU ld (Gentoo 2.35.2 p1) 2.35.2
app-shells/bash:          5.1_p4::gentoo
dev-java/java-config:     2.3.1::gentoo
dev-lang/perl:            5.32.1::gentoo
dev-lang/python:          3.8.8::gentoo, 3.9.2::gentoo
dev-util/cmake:           3.19.6::gentoo
sys-apps/baselayout:      2.7-r1::gentoo
sys-apps/openrc:          0.42.1-r1::gentoo
sys-apps/sandbox:         2.20::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r5::gentoo
sys-devel/automake:       1.16.3-r1::gentoo
sys-devel/binutils:       2.35.2::gentoo
sys-devel/gcc:            10.2.0-r5::gentoo
sys-devel/gcc-config:     2.4::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.3::gentoo
sys-kernel/linux-headers: 5.11::gentoo (virtual/os-headers)
sys-libs/glibc:           2.32-r8::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-metamanifest: yes
    sync-rsync-extra-opts:
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-max-age: 24

localrepo
    location: /var/db/repos/localrepo
    masters: gentoo
    priority: 0

gentoo-mate
    location: /var/lib/layman/gentoo-mate
    masters: gentoo
    priority: 50

pentoo
    location: /var/lib/layman/pentoo
    masters: gentoo
    priority: 50

src_prepare-overlay
    location: /var/lib/layman/src_prepare-overlay
    masters: gentoo
    priority: 50

zugaina
    location: /var/lib/layman/zugaina
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe"
DISTDIR="/var/cache/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://mirror.rackspace.com/gentoo"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="(-selinux) X a52 aac acl acpi alsa amd64 berkdb bluetooth branding bzip2 cairo cdda cdr cli crypt cups dbus dri dts dvd dvdr elogind emboss encode exif flac fortran gdbm gif gmp-autoupdate gpm gtk gui iconv icu introspection ipv6 jpeg lcms libglvnd libnotify libtirpc livecd mad mng mp3 mp4 mpeg multilib native-extensions ncurses nls nptl nss ogg opengl openmp pam pango pcre pdf png policykit ppds ppp pulseaudio qt5 readline rsync-verify samba screenshot sdl seccomp spell split-usr ssl startup-notification svg system-av1 system-harfbuzz system-jpeg system-libevent system-libvpx system-webp tcpd tiff truetype udev udisks unicode upower usb vorbis wifi wxwidgets x264 xattr xcb xml xv xvid zlib" ABI_X86="64" ADA_TARGET="gnat_2018" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64 pc" INPUT_DEVICES="libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-3 php7-4" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_8" PYTHON_TARGETS="python3_8" RUBY_TARGETS="ruby26" USERLAND="GNU" VIDEO_CARDS="amdgpu fbdev intel nouveau radeon radeonsi vesa dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LINGUAS, MAKEOPTS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

----------------------------------------------------------------------------

I'm not by any means well versed in Ruby, but it seems to me that it is looking for a gem (concurrent-ruby) equal to 1.0.5. Every other dependency builds without error. Is there a way to specify a version of concurrent-ruby = to the one I have installed? (dev-ruby/concurrent-ruby-1.1.8::gentoo) Perhaps in a Gemfile somewhere?
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30996
Location: here

PostPosted: Wed Mar 10, 2021 6:40 am    Post subject: Reply with quote

Moved from Portage & Programming to Unsupported Software.
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30996
Location: here

PostPosted: Wed Mar 10, 2021 6:52 am    Post subject: Reply with quote

You should mask all package >dev-ruby/concurrent-ruby-1.0.5 in /etc/portage/package.mask, but if you do this you have to remember in the future, if you have any conflict with ruby_targets, that you did this action.
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
brick_danger
n00b
n00b


Joined: 09 Mar 2021
Posts: 15

PostPosted: Wed Mar 10, 2021 7:44 am    Post subject: Reply with quote

Thanks for the reply.

I was able to solve this by doing the following. First, I installed bundler:

Code:
gem install bundler


I then cd into the tmp directory and ran bundle:

Code:
cd /var/tmp/portage/net-analyzer/metasploit
bundle install


Bundle went through the Gemfile and installed all of the necessary gems including concurrent-ruby-1.0.5

After that, I resumed the emerge:

Code:
emerge -ar net-analyzer/metasploit


Got no errors, so I ran msfconsole and it fired right up.

If anyone has anything to add on this, feel free. I'm new to Gentoo, so I am ready to absorb any feedback.
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 21792

PostPosted: Wed Mar 10, 2021 4:35 pm    Post subject: Reply with quote

What you did should not have worked, unless you ran bundle as root, which you should not do. Where did bundle install those gems? If they are under /usr/local, then they may cause future confusion when they are picked in preference to gems installed by Portage. If they are under /usr, then they may cause future file collisions when Portage tries to merge the same version of the gem. I suggest a bundle uninstall of those gems and switching to install them through Portage, or that you rip out the whole thing and manage the entire install in a user home directory, with Portage unaware of the gems or of metasploit. Mixing hand-installed packages in system directories with system-managed packages usually leads to trouble. You should try to have exactly one package manager with control over an area. Gems installed in a user's home directory are solely under control of bundle; gems installed in the system directories should be solely under control of Portage.
Back to top
View user's profile Send private message
brick_danger
n00b
n00b


Joined: 09 Mar 2021
Posts: 15

PostPosted: Wed Mar 10, 2021 7:53 pm    Post subject: Reply with quote

I used sudo to install them, as I was prompted to do so. Bundler installed concurrent-ruby-1.0.5 in /usr/lib64/ruby/gems/2.6.0/gems along side concurrent-ruby-1.1.8 which was installed through portage. I used bundler because I could not find the version of concurrent-ruby that I needed for metasploit in the portage tree. Since nothing is using concurrent-ruby-1.0.5 except metasploit (this is an old version of this gem), would it be safe to leave it and follow fedeliallalinea's suggestion and just mask the package?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum