lakinduakash / linux-wifi-hotspot

Feature-rich wifi hotspot creator for Linux which provides both GUI and command-line interface. It is also able to create a hotspot using the same wifi card which is connected to an AP already ( Similar to Windows 10).
BSD 2-Clause "Simplified" License
3.01k stars 278 forks source link

Command not found in create_ap #380

Closed sukhjinder-kumar closed 4 months ago

sukhjinder-kumar commented 4 months ago

Describe the bug When I execute the app, using wihotspot, I get -

/usr/bin/create_ap: line 18: basename: command not found
/usr/bin/create_ap: line 109: grep: command not found
/usr/bin/create_ap: line 1075: getopt: command not found

To Reproduce Steps to reproduce the behavior:

  1. I compiled the 4.7.1 release, using make followed by sudo make install
  2. Ran wihotspot, following error comes up

Expected behavior Behave as normal with no errors

Desktop (please complete the following information):

Additional context My $PATH has /usr/bin, create_ap is doesn't show this error when run standalone. Also which basename outputs /usr/bin/basename, similarly which grip gives /usr/bin/grep, and which getopt gives /usr/bin/getopt

It was working the last time I tried it. Not sure what changed. Looking at the error message, it might be a system issue. I would be very grateful if someone could guide me in the right direction.

Full log -

(wihotspot-gui:2766162): GLib-GObject-WARNING **: 13:02:29.169: invalid cast from 'GtkEntry' to 'GtkTextView'

(wihotspot-gui:2766162): Gtk-CRITICAL **: 13:02:29.169: gtk_text_view_get_buffer: assertion 'GTK_IS_TEXT_VIEW (text_view)' failed

(wihotspot-gui:2766162): GLib-GObject-WARNING **: 13:02:29.169: invalid (NULL) pointer instance

(wihotspot-gui:2766162): GLib-GObject-CRITICAL **: 13:02:29.169: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
/usr/bin/create_ap: line 18: basename: command not found
/usr/bin/create_ap: line 109: grep: command not found
/usr/bin/create_ap: line 1075: getopt: command not found
Command not found or exited with error status
Please select Wifi and Internet interfaces
pkexec --user root create_ap wlan0 eth0 'MyAccessPoint' '12345678' --mkconfig /etc/create_ap.conf --freq-band 2.4 --mac  -g <IP-address>
/usr/bin/create_ap: line 18: basename: command not found
/usr/bin/create_ap: line 109: grep: command not found
/usr/bin/create_ap: line 1075: getopt: command not found
Command not found or exited with error status
/usr/bin/create_ap: line 18: basename: command not found
/usr/bin/create_ap: line 109: grep: command not found
/usr/bin/create_ap: line 1075: getopt: command not found
Command not found or exited with error status
lakinduakash commented 4 months ago

Seems like your distro is missing some basic commands. Did you check https://github.com/lakinduakash/linux-wifi-hotspot?tab=readme-ov-file#dependencies? Also, install grep , basename commands

lakinduakash commented 4 months ago

Oh sorry, I didn't see

Additional context

Please check the path variable for the root user as well. May be root user's $PATH variable is misconfigured Ex:

sudo su -
echo $PATH
sukhjinder-kumar commented 3 months ago

Thanks @lakinduakash for taking the time to help me out. I went into root mode and realized the root user's $PATH is missing some directories. When I entered root mode, I was prompted with many errors and an error log stating a path was missing. Made the appropriate changes and now it is working. Thanks for your help.