Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sorry, this hping binary was compiled without TCL scripting support :( #34

Open
8e191a3f-32be-441e-b10b-709124c01dbe opened this issue Feb 13, 2018 · 19 comments

Comments

@8e191a3f-32be-441e-b10b-709124c01dbe

I install hping using: brew install hping , and when I run it I got the error: Sorry, this hping binary was compiled without TCL scripting support.

@ghost
Copy link

ghost commented Jun 15, 2018

do this in terminal:
brew uninstall hping
cd ~
mkdir hping
cd hping
git clone https://github.com/antirez/hping.git
brew install tcl-tk
brew install libpcap
./configure
make
sudo make install
hping

@max-reznichenko
Copy link

i am getting the same error even after manual installation

# hping3
Sorry, this hping binary was compiled without TCL scripting support

hping3 -v is showing the explicit message that there is no TCP support

# ./hping3 -v
hping version 3.0.0-alpha-1 ($Id: release.h,v 1.4 2004/04/09 23:38:56 antirez Exp $)
NO TCL scripting support compiled in  ##<<<< look here

@47k
Copy link

47k commented Oct 12, 2018

@fugiefire

user@device:~/hping/hping$ sudo make install
cp -f hping3 /usr/sbin/
cp: /usr/sbin/hping3: Operation not permitted
make: *** [install] Error 1

@shelbiedatta
Copy link

Did fugiefire solution work?

@thepoppingone
Copy link

thepoppingone commented Nov 25, 2018

@shelbiedatta Yes it works but @47k also mentioned the install error.
From El Capitan onwards you can no longer install or copy flles into /usr/sbin due to SIP (System Integrity Protection) - refer to this post

To fix this, take a look at Makefile in the source, add a local in front of all the sbin and after that make sure your usr/local/sbin is in your $PATH.

cp -f hping3 /usr/local/sbin/
	chmod 755 /usr/local/sbin/hping3
	ln -s /usr/local/sbin/hping3 /usr/local/sbin/hping
	ln -s /usr/local/sbin/hping3 /usr/local/sbin/hping2

Then, run sudo make install again, that should work.

@N0ooooone
Copy link

image
bros, it also can't work...

@N0ooooone
Copy link

image
if I run "sudo", it will work, but I don't wanna sudo all the time..., any ideas? bros

@N0ooooone
Copy link

@fugiefire

user@device:~/hping/hping$ sudo make install
cp -f hping3 /usr/sbin/
cp: /usr/sbin/hping3: Operation not permitted
make: *** [install] Error 1

bro of second floor, if I do the same command, I can't find ./configure file to run this cmd

@thepoppingone
Copy link

@Vs0sV I mentioned the SIP issue above, have you tried that?

@kekulyh
Copy link

kekulyh commented Apr 1, 2019

Tried with all above, still cannot work.

@N0ooooone
Copy link

N0ooooone commented Apr 3, 2019 via email

@caspertsui
Copy link

brew install hping is still not working.
With Homebrew 2.1.2-64-gbcc5f04 and hping: stable 3.20051105 (bottled).
Thanks for your kind help and attention.

@sudosean
Copy link

+1

@aleixsr
Copy link

aleixsr commented Nov 5, 2019

Any way to solve it?
UPDATE: it is working fine, just run a command like "sudo /usr/local/sbin/hping3 -h" and it works.

@TheSneakySniper
Copy link

Note; even if the program says that it was built without scripting, it was not if you followed the steps correctly.

This was the case for me.

@aJesus37
Copy link

do this in terminal:
brew uninstall hping
cd ~
mkdir hping
cd hping
git clone https://github.com/antirez/hping.git
brew install tcl-tk
brew install libpcap
./configure
make
sudo make install
hping

This solution worked for me on Manjaro Linux.

@colinmo
Copy link

colinmo commented Mar 20, 2020

I found installing hping on OS X via brew required making some changes, due to brew installing tcl-tk in a non standard location.

==> Caveats
tcl-tk is keg-only, which means it was not symlinked into /usr/local,
because tk installs some X11 headers and macOS provides an (older) Tcl/Tk.

If you need to have tcl-tk first in your PATH run:
  echo 'export PATH="/usr/local/opt/tcl-tk/bin:$PATH"' >> ~/.bash_profile

For compilers to find tcl-tk you may need to set:
  export LDFLAGS="-L/usr/local/opt/tcl-tk/lib"
  export CPPFLAGS="-I/usr/local/opt/tcl-tk/include"

For pkg-config to find tcl-tk you may need to set:
  export PKG_CONFIG_PATH="/usr/local/opt/tcl-tk/lib/pkgconfig"

So I had to make the following adjustments to the configure file before I ran the ./configure step:

  1. Line 64, add "/usr/local/opt/tcl-tk/bin/" to the end so the script can find the right tcl binary
  2. Line 66, add "8.6" to the end so the script can get the version of tcl-tk brew downloaded (check in /usr/local/opt/tcl-tk/bin for a file starting with tclsh8.? to get the correct version number.)
  3. Line 84, replace the line with the following, so it can get the right include location
  if [ -e /usr/local/opt/tcl-tk/lib/tcl${TCL_VER} ]
  then
      TCL_INC="-I/usr/local/opt/tcl-tk/lib/tcl${TCL_VER}"
  elif [ -e /usr/include/tcl${TCL_VER} ]

Then in the Makefile change all references to /usr/sbin to /usr/local/bin, because on OS X we don't have any rights to write there even as sudo.

After this I could resume the instructions from ./configure. If you've tried this before and failed, be sure and run make clean to remove any artifacts from previous attempts.

@ghost
Copy link

ghost commented Jan 16, 2022

Any patch for Arch linux?

@petekowalsky
Copy link

petekowalsky commented Aug 25, 2022

@colinmo Hey I know this was a while back, but I'm on my new work laptop (fresh install) and I could not for the life of me remember how I did this before, so THANKS very much for your explanatory post. Very helpful.

I have another issue now (though the binary seems to work), in that I have no man page for hping/2/3 being created so I guess I have to work that out. With so many command line options, a locally-available man page would be super-useful. (edit: 'hping -help' will do it but it's not the same LOL)

Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests