Results 1 to 4 of 4

Thread: Getting Make Error=2. Trying to compile rtl8192eu driver.

  1. #1
    Join Date
    2017-Jan
    Posts
    28

    Getting Make Error=2. Trying to compile rtl8192eu driver.

    Hi.
    I am trying to compile driver rtl8192eu to use with my external wifi interface TL-WN822N adapter.
    I am getting an error on the make command:

    make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/4.17.0-kali1-amd64/build M=/root/rtl8192eu-linux-driver modules
    make[1]: *** /lib/modules/4.17.0-kali1-amd64/build: No such file or directory. Stop.
    make: *** [Makefile:1700: modules] Error 2

    I have the latest version of Kali Linux installed on a USB Pendrive.
    Can somebody assist me, not to familiar with compiling errors in Linux.

    Thanks TC.

    Here's what I did:
    **Performed a apt-get update, upgrade and dist-upgrade initially.**

    1) Verified I had the latest Kali Image Build.
    uname -a
    Linux kali 4.17.0-kali1-amd64 #1 SMP Debian 4.17.8-1kali1 (2018-07-24) x86_64 GNU/Linux

    Latest image was already installed.
    root@kali:~# apt-get install linux-image-4.17.0-kali3-amd64
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    linux-image-4.17.0-kali3-amd64 is already the newest version (4.17.17-1kali1).


    2) Needed to install Linux-Headers. Typed the following command:
    apt-get install linux-headers-$(uname -r)
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    E: Unable to locate package linux-headers-4.17.0-kali1-amd64
    E: Couldn't find any package by glob 'linux-headers-4.17.0-kali1-amd64'
    E: Couldn't find any package by regex 'linux-headers-4.17.0-kali1-amd64'

    3) Could not find a matching linux-header-4.17.0-kali1-amd64. Searched linux-images. text in red was the selected linux header I install.
    root@kali:~# apt-cache search linux-image

    linux-headers-4.17.0-kali3-amd64 - Header files for Linux 4.17.0-kali3-amd64
    linux-headers-4.17.0-kali3-cloud-amd64 - Header files for Linux 4.17.0-kali3-cloud-amd64
    linux-image-4.17.0-kali3-amd64 - Linux 4.17 for 64-bit PCs

    4) Finally entered the first 3 terminal commands below before receiving the ?Make? error.
    git clone https://github.com/Mange/rtl8192eu-l...iver/issues/44
    cd rtl8192eu-linux-driver
    sudo make
    sudo make install
    sudo modprobe 8192eu

    ****Notes***

    In Lib/Module I see 2 folders /lib/modules/4.17.0-kali1 and /lib/modules/4.17.0-kali3.
    Do I need libelf-dev package installed? This was a requirement for Ubuntu to work.

  2. #2
    Join Date
    2016-Dec
    Posts
    806
    See other thread for questions and notes: https://forums.kali.org/showthread.p...monitor-mode-(

    You need to run "apt-get update && apt-get dist-upgrade", then reboot and finally install the corresponding kenel headers (or sources). Before you try that, you probably want to check if the adapter is not already supported by plugging it, looking in dmesg for output and/or using airmon-ng. dmesg is better because it can tell you if there is a missing firmware

  3. #3
    Join Date
    2017-Jan
    Posts
    28
    Hi Mister_X.

    Thanks for your quick feedback.
    I'll try to look for firmware for wifi rtl819eu driver, but cannot determine if this is my make error code=2 problem.
    The driver is from Realtek so maybe i need to install firmware for Realtek.
    Can you or other members take a quick look at my reply and see if anything appears strange.

    Based on your reply to my original post, I executed the following with desired output results.

    Plugged external adapter Tl_WN822N adapter in USB port to determine if rtl819eu drivers are pre-loaded and can connect to this wifi hotspot.
    Result: Received message ?Connection Failed?!
    I see Wlan0 in Ifconfig. Did a ifconfig wlan0 up. Same message Connection Failed!

    Did apt-get update && apt-get dist-upgrade. Rebooted.
    Installed linux header: linux-headers-4.17.0-kali3-amd64
    Result: Linux Header installed successfully.
    Msg: Setting up linux-headers-4.17.0-kali3-amd64 (4.17.17-1kali1.
    Then did another Git Clone, CD and ?Make? command for RTL8192eu driver.
    Result: sudo Make failed with error code 2. Same msg as my first post.

    ** Is it possible I have unmatched Linux Header and Linux Image installed.
    Highlighted in Red is the Linux header I selected.
    apt-cache search linux-headers
    aufs-dkms - DKMS files to build and install aufs
    linux-headers-4.17.0-kali3-all - All header files for Linux 4.17 (meta-package)
    linux-headers-4.17.0-kali3-all-amd64 - All header files for Linux 4.17 (meta-package)
    linux-headers-4.17.0-kali3-amd64 - Header files for Linux 4.17.0-kali3-amd64
    linux-headers-4.17.0-kali3-cloud-amd64 - Header files for Linux 4.17.0-kali3-cloud-amd64
    linux-headers-4.17.0-kali3-common - Common header files for Linux 4.17.0-kali3

    ** Linux header I installed.
    sudo dpkg-query -l "linux-headers*"
    Desired=Unknown/Install/Remove/Purge/Hold
    | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
    |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
    ||/ Name Version Architecture Description
    +++-==============-============-============-=================================
    un linux-headers <none> <none> (no description available)
    ii linux-headers- 4.17.17-1kal amd64 Header files for Linux 4.17.0-kali
    ii linux-headers- 4.17.17-1kal all Common header files for Linux 4.1

    cat /proc/version
    Linux version 4.17.0-kali1-amd64 ([email protected]) (gcc version 7.3.0 (Debian 7.3.0-25)) #1 SMP Debian 4.17.8-1kali1 (2018-07-24)



    Plugged in TL-WN822N adapter to produce the following reports:

    airmon-ng: HY Interface Driver Chipset phy2 wlan0 rtl8xxxu

    The airmon-ng cmd is showing driver rtl8xxxu.


    root@kali:~# sudo lsmod | grep cfg
    cfg80211 774144 2 b43,mac80211
    rfkill 28672 7 bluetooth,dell_laptop,cfg80211

    root@kali:~# lsusb
    Bus 001 Device 002: ID 8087:8001 Intel Corp.
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 003 Device 002: ID 2109:0813 VIA Labs, Inc.
    Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
    Bus 002 Device 006: ID 0bda:5682 Realtek Semiconductor Corp.
    Bus 002 Device 004: ID 0a5c:216f Broadcom Corp. BCM20702A0 Bluetooth
    Bus 002 Device 007: ID 0930:6544 Toshiba Corp. TransMemory-Mini / Kingston DataTraveler 2.0 Stick (2GB)
    Bus 002 Device 008: ID 2357:0108
    Bus 002 Device 003: ID 2109:2813 VIA Labs, Inc.
    Bus 002 Device 002: ID 046d:c077 Logitech, Inc. M105 Optical Mouse
    Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

    ** Below is a condense dmesg rpt. Cannot tell if I need additional firmware, but it does show driver rtl8192eu with adapter not ready See Red text.


    root@kali:~# dmesg
    [ 0.000000] Linux version 4.17.0-kali1-amd64 ([email protected]) (gcc version 7.3.0 (Debian 7.3.0-25)) #1 SMP Debian 4.17.8-1kali1 (2018-07-24)
    [ 0.000000] Command line: BOOT_IMAGE=/live/vmlinuz-4.17.0-kali1-amd64 boot=live components splash username=root hostname=kali persistence
    [ 0.000000] x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers'
    [ 0.000000] x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers'
    [ 0.000000] x86/fpu: Supporting XSAVE feature 0x004: 'AVX registers'
    [ 0.000000] x86/fpu: xstate_offset[2]: 576, xstate_sizes[2]: 256
    [ 0.000000] x86/fpu: Enabled xstate features 0x7, context size is 832 bytes, using 'standard' format.
    [ 0.000000] e820: BIOS-provided physical RAM map:
    Booting paravirtualized kernel on bare hardware
    [ 0.000000] clocksource: refined-jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645519600211568 ns
    [ 0.000000] random: get_random_bytes called from start_kernel+0x94/0x52e with crng_init=0
    [ 0.000000] setup_percpu: NR_CPUS:512 nr_cpumask_bits:512 nr_cpu_ids:4 nr_node_ids:1
    [ 0.000000] percpu: Embedded 44 pages/cpu @ (ptrval) s142360 r8192 d29672 u524288
    [ 0.000000] pcpu-alloc: s142360 r8192 d29672 u524288 alloc=1*2097152
    [ 0.000000] pcpu-alloc: [0] 0 1 2 3
    [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 2040340
    [ 0.000000] Policy zone: Normal
    [ 0.000000] Kernel command line: BOOT_IMAGE=/live/vmlinuz-4.17.0-kali1-amd64 boot=live components splash username=root hostname=kali persistence
    [ 0.000000] Calgary: detecting Calgary via BIOS EBDA area
    [ 0.000000] Calgary: Unable to locate Rio Grande table in EBDA - bailing!
    [ 0.000000] Memory: 7696200K/8291016K available (10252K kernel code, 1210K rwdata, 3216K rodata, 1548K init, 656K bss, 594816K reserved, 0K cma-reserved)
    [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
    [ 0.000000] Kernel/User page tables isolation: enabled
    [ 0.000000] ftrace: allocating 30818 entries in 121 pages
    hid-generic 0003:046D:C077.0002: input,hidraw1: USB HID v1.11 Mouse [Logitech USB Optical Mouse] on usb-0000:00:14.0-1/input0
    2424.313890] usb 2-2.1: ath9k_htc: USB layer deinitialized
    [ 2427.917847] usb 2-2.1: new high-speed USB device number 8 using xhci_hcd
    [ 2428.030472] usb 2-2.1: New USB device found, idVendor=2357, idProduct=0108, bcdDevice= 2.00
    [ 2428.030483] usb 2-2.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
    [ 2428.030489] usb 2-2.1: Product: 802.11n NIC
    [ 2428.030495] usb 2-2.1: Manufacturer: Realtek
    [ 2428.030500] usb 2-2.1: SerialNumber: 00e04c000001
    [ 2436.067654] usb 2-2.1: This Realtek USB WiFi dongle (0x2357:0x0108) is untested!
    [ 2436.067659] usb 2-2.1: Please report results to [email protected]
    [ 2436.132043] usb 2-2.1: Vendor: Realtek
    [ 2436.132048] usb 2-2.1: Product: #802.11n NI
    [ 2436.132051] usb 2-2.1: Serial:
    [ 2436.132054] usb 2-2.1: rtl8192eu_parse_efuse: dumping efuse (0x200 bytes):
    2436.132217] usb 2-2.1: RTL8192EU rev B (SMIC) 2T2R, TX queues 3, WiFi=1, BT=0, GPS=0, HI PA=0
    [ 2436.132220] usb 2-2.1: RTL8192EU MAC: 18:a6:f7:12:cb:e1
    [ 2436.132223] usb 2-2.1: rtl8xxxu: Loading firmware rtlwifi/rtl8192eu_nic.bin
    [ 2488.997391] usb 2-2.1: firmware: direct-loading firmware rtlwifi/rtl8192eu_nic.bin
    [ 2488.997405] usb 2-2.1: Firmware revision 19.0 (signature 0x92e1)
    [ 2489.881187] usbcore: registered new interface driver rtl8xxxu
    [ 2489.920067] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
    [ 2489.926454] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
    [ 2489.933791] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
    [ 2489.982608] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
    [ 2498.894229] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
    [ 2500.030056] wlan0
    : authenticate with 24:a4:3c:4f:49:4a
    [ 2500.035716] wlan0: send auth to 24:a4:3c:4f:49:4a (try 1/3)
    [ 2500.238063] wlan0: send auth to 24:a4:3c:4f:49:4a (try 2/3)
    [ 2500.442214] wlan0: send auth to 24:a4:3c:4f:49:4a (try 3/3)
    [ 2500.646215] wlan0: authentication with 24:a4:3c:4f:49:4a timed out
    [ 1.971531] usbcore: registered new interface driver usbhid
    [ 1.971533] usbhid: USB HID core driver
    [ 2.129590] usb 3-2: new SuperSpeed USB device number 2 using xhci_hcd
    [ 2.233176] usb 3-2: New USB device found, idVendor=2109, idProduct=0813, bcdDevice=90.11
    [ 2.233182] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
    [ 2.233185] usb 3-2: Product: USB3.0 Hub
    [ 2.233189] usb 3-2: Manufacturer: VIA Labs, Inc.
    [ 2.235476] hub 3-2:1.0: USB hub found
    [ 2.235604] hub 3-2:1.0: 4 ports detected
    [ 2.356142] usb 2-2: new high-speed USB device number 3 using xhci_hcd
    [ 2.510859] usb 2-2: New USB device found, idVendor=2109, idProduct=2813, bcdDevice=90.11
    [ 2.510864] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
    [ 2.510868] usb 2-2: Product: USB2.0 Hub
    [ 2.510871] usb 2-2: Manufacturer: VIA Labs, Inc.
    [ 2.511959] hub 2-2:1.0: USB hub found
    [ 2.512822] hub 2-2:1.0: 4 ports detected
    [ 2.656059] usb 2-3: new full-speed USB device number 4 using xhci_hcd
    [ 2.657699] Console: switching to colour frame buffer device 240x67
    [ 2.685485] i915 0000:00:02.0: fb0: inteldrmfb frame buffer device
    [ 2.705439] sd 3:0:0:0: [sda] 500118192 512-byte logical blocks: (256 GB/238 GiB)
    [ 2.707623] sd 3:0:0:0: [sda] Write Protect is off
    [ 2.709518] sd 3:0:0:0: [sda] Mode Sense: 00 3a 00 00
    [ 2.709601] sd 3:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
    [ 2.721646] sda: sda1 sda2 sda3 sda4 sda5 sda6 sda7
    [ 2.723480] sd 3:0:0:0: [sda] Attached SCSI disk
    [ 2.811268] usb 2-3: New USB device found, idVendor=0a5c, idProduct=216f, bcdDevice= 1.12
    [ 2.813202] usb 2-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
    [ 2.815121] usb 2-3: Product: BCM20702A0
    [ 2.817044] usb 2-3: Manufacturer: Broadcom Corp
    [ 2.818965] usb 2-3: SerialNumber: 2C337AF5C5EA
    [ 2.900066] usb 2-2.1: new high-speed USB device number 5 using xhci_hcd
    [ 3.032797] usb 2-2.1: New USB device found, idVendor=0cf3, idProduct=9271, bcdDevice= 1.08
    [ 3.036254] usb 2-2.1: New USB device strings: Mfr=16, Product=32, SerialNumber=48
    [ 3.039668] usb 2-2.1: Product: USB2.0 WLAN
    [ 3.043082] usb 2-2.1: Manufacturer: ATHEROS
    [ 3.044329] usb 2-2.1: SerialNumber: 12345
    [ 3.164053] usb 2-5: new high-speed USB device number 6 using xhci_hcd
    [ 3.355875] usb 2-5: New USB device found, idVendor=0bda, idProduct=5682, bcdDevice=48.14
    [ 3.357906] usb 2-5: New USB device strings: Mfr=3, Product=1, SerialNumber=2
    [ 3.359811] usb 2-5: Product: Integrated_Webcam_HD
    [ 3.361703] usb 2-5: Manufacturer: CKFEH41F301030002190
    [ 3.363579] usb 2-5: SerialNumber: 200901010001
    [ 3.404065] usb 2-2.2: new high-speed USB device number 7 using xhci_hcd
    [ 3.406661] ntfs: driver 2.1.32 [Flags: R/O MODULE].
    [ 3.426198] ntfs: volume version 3.1.
    [ 3.513442] ntfs: volume version 3.1.
    [ 3.525906] usb 2-2.2: New USB device found, idVendor=0930, idProduct=6544, bcdDevice= 1.00
    [ 3.528410] usb 2-2.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
    [ 3.530577] usb 2-2.2: Product: TransMemory
    [ 3.532545] usb 2-2.2: Manufacturer: TOSHIBA
    [ 3.534058] usb 2-2.2: SerialNumber: 0022CFF6B89AC22082BCDD64
    [ 3.538392] usb-storage 2-2.2:1.0: USB Mass Storage device detected
    [ 3.539517] scsi host4: usb-storage 2-2.2:1.0
    [ 3.540676] usbcore: registered new interface driver usb-storage
    [ 3.542356] usbcore: registered new interface driver uas
    [ 3.569204] ntfs: volume version 3.1.
    [ 3.682274] ntfs: volume version 3.1.
    [ 4.568559] scsi 4:0:0:0: Direct-Access TOSHIBA TransMemory 1.00 PQ: 0 ANSI: 4
    [ 4.608845] sd 4:0:0:0: [sdb] 60549120 512-byte logical blocks: (31.0 GB/28.9 GiB)
    [ 4.612289] sd 4:0:0:0: [sdb] Write Protect is off
    [ 4.616723] sd 4:0:0:0: [sdb] Mode Sense: 45 00 00 00
    [ 4.617299] sd 4:0:0:0: [sdb] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
    [ 4.622014] sdb: sdb1 sdb2
    [ 4.623984] sd 4:0:0:0: [sdb] Attached SCSI removable disk
    [ 4.911237] loop: module loaded
    [ 5.378563] random: crng init done
    [ 5.653332] squashfs: version 4.0 (2009/01/31) Phillip Lougher
    [ 5.664286] uhci_hcd: USB Universal Host Controller Interface driver
    [ 5.668249] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
    [ 11.248267] ntfs: volume version 3.1.
    [ 11.351697] ntfs: volume version 3.1.
    [ 11.435639] ntfs: volume version 3.1.
    [ 11.651123] ntfs: volume version 3.1.

  4. #4
    Join Date
    2017-Jan
    Posts
    28
    Found my problem with the compile error=2, trying to compile rtl8192eu driver.
    Linux Header installed was different than Linux Image build.
    In short, I had to install the nightly Kali build over the Official website Kali build.
    linux-header-4.17.0-kali1-amd64 (not found in Official downloads).
    linux-header-4.17.0-kali3-amd64 (found in Nightly build).

    Can now run Kali linux with external wifi dongle WN822N using rtl8192eu.
    TC.

Similar Threads

  1. RT5390 driver compile/install help
    By meanjoegreene01 in forum TroubleShooting Archive
    Replies: 0
    Last Post: 2016-03-12, 00:50
  2. RTL8192EU Driver for Kali Linux 2016.1
    By yuhun in forum General Archive
    Replies: 1
    Last Post: 2016-03-01, 20:08
  3. RTL8192EU(not CU) USB WiFi Card Driver Help
    By Philip.johann in forum TroubleShooting Archive
    Replies: 0
    Last Post: 2015-10-23, 10:30

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •