Can't run wpscan

Hello whenever I install and run wpscan I get the following error:

/usr/lib/ruby/3.3.0/json/common.rb:3: warning: ostruct was loaded from the standard library, but will no longer be part of the default gems starting from Ruby 3.5.0.
You can add ostruct to your Gemfile or gemspec to silence this warning.
/usr/lib/ruby/3.3.0/bundled_gems.rb:75:in `require': cannot load such file -- ffi_c (LoadError)
Did you mean?  ffi
	from /usr/lib/ruby/3.3.0/bundled_gems.rb:75:in `block (2 levels) in replace_require'
	from /opt/wpscan/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-x86_64-linux-gnu/lib/ffi.rb:5:in `rescue in <top (required)>'
	from /opt/wpscan/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-x86_64-linux-gnu/lib/ffi.rb:2:in `<top (required)>'
	from /usr/lib/ruby/3.3.0/bundled_gems.rb:75:in `require'
	from /usr/lib/ruby/3.3.0/bundled_gems.rb:75:in `block (2 levels) in replace_require'
	from /opt/wpscan/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon.rb:3:in `<top (required)>'
	from /usr/lib/ruby/3.3.0/bundled_gems.rb:75:in `require'
	from /usr/lib/ruby/3.3.0/bundled_gems.rb:75:in `block (2 levels) in replace_require'
	from /opt/wpscan/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus.rb:2:in `<top (required)>'
	from /usr/lib/ruby/3.3.0/bundled_gems.rb:75:in `require'
	from /usr/lib/ruby/3.3.0/bundled_gems.rb:75:in `block (2 levels) in replace_require'
	from /opt/wpscan/vendor/bundle/ruby/3.3.0/gems/cms_scanner-0.14.3/lib/cms_scanner.rb:4:in `<top (required)>'
	from /usr/lib/ruby/3.3.0/bundled_gems.rb:75:in `require'
	from /usr/lib/ruby/3.3.0/bundled_gems.rb:75:in `block (2 levels) in replace_require'
	from /opt/wpscan/lib/wpscan.rb:8:in `<top (required)>'
	from /usr/lib/ruby/3.3.0/bundled_gems.rb:75:in `require'
	from /usr/lib/ruby/3.3.0/bundled_gems.rb:75:in `block (2 levels) in replace_require'
	from /opt/wpscan/bin/wpscan:4:in `<main>'
/usr/lib/ruby/3.3.0/bundled_gems.rb:75:in `require': cannot load such file -- 3.3/ffi_c (LoadError)
	from /usr/lib/ruby/3.3.0/bundled_gems.rb:75:in `block (2 levels) in replace_require'
	from /opt/wpscan/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-x86_64-linux-gnu/lib/ffi.rb:3:in `<top (required)>'
	from /usr/lib/ruby/3.3.0/bundled_gems.rb:75:in `require'
	from /usr/lib/ruby/3.3.0/bundled_gems.rb:75:in `block (2 levels) in replace_require'
	from /opt/wpscan/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon.rb:3:in `<top (required)>'
	from /usr/lib/ruby/3.3.0/bundled_gems.rb:75:in `require'
	from /usr/lib/ruby/3.3.0/bundled_gems.rb:75:in `block (2 levels) in replace_require'
	from /opt/wpscan/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus.rb:2:in `<top (required)>'
	from /usr/lib/ruby/3.3.0/bundled_gems.rb:75:in `require'
	from /usr/lib/ruby/3.3.0/bundled_gems.rb:75:in `block (2 levels) in replace_require'
	from /opt/wpscan/vendor/bundle/ruby/3.3.0/gems/cms_scanner-0.14.3/lib/cms_scanner.rb:4:in `<top (required)>'
	from /usr/lib/ruby/3.3.0/bundled_gems.rb:75:in `require'
	from /usr/lib/ruby/3.3.0/bundled_gems.rb:75:in `block (2 levels) in replace_require'
	from /opt/wpscan/lib/wpscan.rb:8:in `<top (required)>'
	from /usr/lib/ruby/3.3.0/bundled_gems.rb:75:in `require'
	from /usr/lib/ruby/3.3.0/bundled_gems.rb:75:in `block (2 levels) in replace_require'
	from /opt/wpscan/bin/wpscan:4:in `<main>'

I tried to reinstall ffi gem.
PS: I use fish shell.

Please can you provide your

garuda-inxi

as per the forum template

2 Likes

It should be this still currently open Arch bug report.

3 Likes
System:
  Kernel: 6.6.62-1-lts arch: x86_64 bits: 64 compiler: gcc v: 14.2.1
    clocksource: tsc avail: hpet,acpi_pm
    parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-lts
    root=UUID=a7ae099d-2d42-444b-97b7-9dbe528d97d9 rw rootflags=subvol=@
    quiet resume=UUID=8bae06e3-dda0-4d8f-b96f-d7f4d1e01098 loglevel=3 ibt=off
  Desktop: Cinnamon v: 6.2.9 tk: GTK v: 3.24.43 wm: Muffin v: 6.2.0
    with: plank,ulauncher tools: avail: cinnamon-screensaver, i3lock,
    xautolock, xfce4-screensaver vt: 7 dm: LightDM v: 1.32.0 Distro: Garuda
    base: Arch Linux
Machine:
  Type: Laptop System: LENOVO product: 20NKS30E00 v: ThinkPad T495
    serial: <superuser required> Chassis: type: 10 serial: <superuser required>
  Mobo: LENOVO model: 20NKS30E00 v: SDK0J40697 WIN
    serial: <superuser required>
    part-nu: LENOVO_MT_20NK_BU_Think_FM_ThinkPad T495
    uuid: <superuser required> UEFI: LENOVO v: R12ET64W(1.34 )
    date: 02/23/2024
Battery:
  ID-1: BAT0 charge: 49.0 Wh (97.0%) condition: 50.5/50.5 Wh (100.0%)
    volts: 12.8 min: 11.6 model: LGC 5B10W139 type: Li-poly serial: <filter>
    status: not charging cycles: 203
CPU:
  Info: model: AMD Ryzen 5 PRO 3500U w/ Radeon Vega Mobile Gfx bits: 64
    type: MT MCP arch: Zen/Zen+ note: check gen: 1 level: v3 note: check
    built: 2019 process: GF 12nm family: 0x17 (23) model-id: 0x18 (24)
    stepping: 1 microcode: 0x8108109
  Topology: cpus: 1x dies: 1 clusters: 1 cores: 4 threads: 8 tpc: 2
    smt: enabled cache: L1: 384 KiB desc: d-4x32 KiB; i-4x64 KiB L2: 2 MiB
    desc: 4x512 KiB L3: 4 MiB desc: 1x4 MiB
  Speed (MHz): avg: 1235 min/max: 1400/2100 boost: enabled scaling:
    driver: acpi-cpufreq governor: schedutil cores: 1: 1235 2: 1235 3: 1235
    4: 1235 5: 1235 6: 1235 7: 1235 8: 1235 bogomips: 33549
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
  Vulnerabilities: <filter>
Graphics:
  Device-1: Advanced Micro Devices [AMD/ATI] Picasso/Raven 2 [Radeon Vega
    Series / Radeon Mobile Series] vendor: Lenovo driver: amdgpu v: kernel
    arch: GCN-5 code: Vega process: GF 14nm built: 2017-20 pcie: gen: 3
    speed: 8 GT/s lanes: 16 ports: active: eDP-1 empty: DP-1,DP-2,HDMI-A-1
    bus-ID: 06:00.0 chip-ID: 1002:15d8 class-ID: 0300 temp: 64.0 C
  Device-2: Chicony Integrated Camera driver: uvcvideo type: USB rev: 2.0
    speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 4-2.1:4 chip-ID: 04f2:b6d9
    class-ID: 0e02 serial: <filter>
  Display: x11 server: X.Org v: 21.1.14 with: Xwayland v: 24.1.4 driver: X:
    loaded: amdgpu unloaded: modesetting,vesa alternate: fbdev dri: radeonsi
    gpu: amdgpu display-ID: :0 screens: 1
  Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.00x11.22")
    s-diag: 582mm (22.93")
  Monitor-1: eDP-1 mapped: eDP model: AU Optronics 0x403d built: 2018
    res: 1920x1080 hz: 60 dpi: 158 gamma: 1.2 size: 309x174mm (12.17x6.85")
    diag: 355mm (14") ratio: 16:9 modes: max: 1920x1080 min: 640x480
  API: Vulkan v: 1.3.295 layers: 9 device: 0 type: integrated-gpu name: AMD
    Radeon Vega 8 Graphics (RADV RAVEN) driver: mesa radv v: 24.2.7-arch1.1
    device-ID: 1002:15d8 surfaces: xcb,xlib device: 1 type: cpu name: llvmpipe
    (LLVM 18.1.8 256 bits) driver: mesa llvmpipe v: 24.2.7-arch1.1 (LLVM
    18.1.8) device-ID: 10005:0000 surfaces: xcb,xlib
  API: OpenGL Message: Unable to show GL data. glxinfo is missing.
Audio:
  Device-1: Advanced Micro Devices [AMD/ATI] Raven/Raven2/Fenghuang HDMI/DP
    Audio vendor: Lenovo driver: snd_hda_intel v: kernel pcie: gen: 3
    speed: 8 GT/s lanes: 16 bus-ID: 06:00.1 chip-ID: 1002:15de class-ID: 0403
  Device-2: Advanced Micro Devices [AMD] ACP/ACP3X/ACP6x Audio Coprocessor
    vendor: Lenovo driver: snd_pci_acp3x v: kernel alternate: snd_rn_pci_acp3x,
    snd_pci_acp5x, snd_pci_acp6x, snd_acp_pci, snd_rpl_pci_acp6x, snd_pci_ps,
    snd_sof_amd_renoir, snd_sof_amd_rembrandt, snd_sof_amd_vangogh pcie:
    gen: 3 speed: 8 GT/s lanes: 16 bus-ID: 06:00.5 chip-ID: 1022:15e2
    class-ID: 0480
  Device-3: Advanced Micro Devices [AMD] Family 17h/19h HD Audio
    vendor: Lenovo driver: snd_hda_intel v: kernel pcie: gen: 3 speed: 8 GT/s
    lanes: 16 bus-ID: 06:00.6 chip-ID: 1022:15e3 class-ID: 0403
  API: ALSA v: k6.6.62-1-lts status: kernel-api tools: N/A
  Server-1: sndiod v: N/A status: off tools: aucat,midicat,sndioctl
  Server-2: PipeWire v: 1.2.6 status: active with: 1: pipewire-pulse
    status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
    4: pw-jack type: plugin tools: pactl,pw-cat,pw-cli,wpctl
Network:
  Device-1: Intel Wi-Fi 5 Wireless-AC 9x6x [Thunder Peak] driver: iwlwifi
    v: kernel pcie: gen: 2 speed: 5 GT/s lanes: 1 bus-ID: 01:00.0
    chip-ID: 8086:2526 class-ID: 0280
  IF: wlp1s0 state: up mac: <filter>
  Device-2: Realtek RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet
    vendor: Lenovo driver: r8169 v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 1
    port: 3400 bus-ID: 03:00.0 chip-ID: 10ec:8168 class-ID: 0200
  IF: enp3s0f0 state: down mac: <filter>
  Device-3: Realtek RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet
    vendor: Lenovo driver: r8169 v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 1
    port: 2000 bus-ID: 04:00.0 chip-ID: 10ec:8168 class-ID: 0200
  IF: enp4s0 state: down mac: <filter>
  Info: services: httpd, NetworkManager, smbd, systemd-timesyncd,
    wpa_supplicant
Bluetooth:
  Device-1: Intel Wireless-AC 9260 Bluetooth Adapter driver: btusb v: 0.8
    type: USB rev: 2.0 speed: 12 Mb/s lanes: 1 mode: 1.1 bus-ID: 4-1:2
    chip-ID: 8087:0025 class-ID: e001
  Report: btmgmt ID: hci0 rfk-id: 1 state: up address: <filter> bt-v: 5.1
    lmp-v: 10 status: discoverable: no pairing: no class-ID: 6c010c
Drives:
  Local Storage: total: 238.47 GiB used: 93.01 GiB (39.0%)
  SMART Message: Required tool smartctl not installed. Check --recommends
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Western Digital
    model: PC SN520 NVMe WDC 256GB size: 238.47 GiB block-size: physical: 512 B
    logical: 512 B speed: 15.8 Gb/s lanes: 2 tech: SSD serial: <filter>
    fw-rev: 20240012 temp: 44.9 C scheme: GPT
Partition:
  ID-1: / raw-size: 223.25 GiB size: 223.25 GiB (100.00%)
    used: 93.01 GiB (41.7%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
  ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
    used: 584 KiB (0.2%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1
  ID-3: /home raw-size: 223.25 GiB size: 223.25 GiB (100.00%)
    used: 93.01 GiB (41.7%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
  ID-4: /var/log raw-size: 223.25 GiB size: 223.25 GiB (100.00%)
    used: 93.01 GiB (41.7%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
  ID-5: /var/tmp raw-size: 223.25 GiB size: 223.25 GiB (100.00%)
    used: 93.01 GiB (41.7%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
Swap:
  Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default) zswap: no
  ID-1: swap-1 type: partition size: 14.92 GiB used: 0 KiB (0.0%)
    priority: -2 dev: /dev/nvme0n1p3 maj-min: 259:3
  ID-2: swap-2 type: zram size: 13.57 GiB used: 0 KiB (0.0%) priority: 100
    comp: zstd avail: lzo,lzo-rle,lz4,lz4hc,842 max-streams: 8 dev: /dev/zram0
Sensors:
  System Temperatures: cpu: 65.0 C mobo: N/A gpu: amdgpu temp: 63.0 C
  Fan Speeds (rpm): fan-1: 3200 fan-2: 3200
Info:
  Memory: total: 16 GiB note: est. available: 13.57 GiB used: 7.01 GiB (51.6%)
  Processes: 378 Power: uptime: 39m states: freeze,mem,disk suspend: deep
    avail: s2idle wakeups: 0 hibernate: platform avail: shutdown, reboot,
    suspend, test_resume image: 5.41 GiB services: csd-power,upowerd
    Init: systemd v: 256 default: graphical tool: systemctl
  Packages: pm: pacman pkgs: 2083 libs: 586 tools: aura,pamac,paru,yay
    pm: flatpak pkgs: 0 Compilers: gcc: 14.2.1 Shell: garuda-inxi default: fish
    v: 3.7.1 running-in: terminator inxi: 3.3.36
Garuda (2.6.26-1):
  System install date:     2024-11-16
  Last full system update: 2024-11-22 ↻
  Is partially upgraded:   No
  Relevant software:       snapper NetworkManager dracut
  Windows dual boot:       No/Undetected
  Failed units:        

No fix yet?

No, if it’s still open.
Actually the question should be done to the package maintainer :wink:, since the bug is confirmed since some time now. And it seems to be a packaging issue, not an upstream bug.
Maybe you could use the docker version until the package is fixed? Or even the web one…? I don’t know much about it apart that it is well-known…

3 Likes

Looks like you installed it through the blackarch-repo, how about uninstall it and install it the ruby way.

gem install wpscan

idk if ruby binaries are already in PATH, but you can add that.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.