gg
gg copied to clipboard
tips: solve error `Segmentation fault (core dumped)`
A probable cause for the Segmentation fault (core dumped)
error is that the UPX-compressed binary failed to self-unpacked and run on the current OS. This case has been caught on the Rocky Linux 9.1 OS.
(However, I can not reproduce this problem inside the docker image rockylinux:9.1
)
People who ran into the same condition may try downloading the binary of UPX on the GitHub releases page, then issue the command upx -d ./gg
to revert the compression.
Here is an example:
[root@xxx git]# ./test-bin
Segmentation fault (core dumped)
[root@xxx git]# upx -d ./test-bin
Ultimate Packer for eXecutables
Copyright (C) 1996 - 2023
UPX 4.0.2 Markus Oberhumer, Laszlo Molnar & John Reiser Jan 30th 2023
File size Ratio Format Name
-------------------- ------ ----------- -----------
[WARNING] bad b_info at 0x55c58c
[WARNING] ... recovery at 0x55c588
14471678 <- 5621256 38.84% linux/amd64 test-bin
Unpacked 1 file.
[root@xxx git]# ll
total 14136
drwxr-xr-x. 13 root root 4096 Feb 7 16:08 gg
-rwxr-xr-x. 1 root root 14467072 Feb 7 16:14 test-bin
[root@xxx git]# ./test-bin --help
go-graft is a portable tool to redirect the traffic of a given
program to your modern proxy without installing any other programs.
Usage:
gg [flags] [command [argument ...]]
gg [command]
Available Commands:
completion generate the autocompletion script for the specified shell
config Get and set persistent global options
help Help about any command
Flags:
-h, --help help for gg
-n, --node string node share-link of your modern proxy
--noudp do not redirect UDP traffic, even though the proxy server supports
--select manually select the node to connect from the subscription
-s, --subscription string subscription-link of your modern proxy
--testnode string test the connectivity before connecting to the node (default "true")
-v, --verbose count verbose (-v, or -vv)
--version version for gg
Use "gg [command] --help" for more information about a command.
Thank you, I am also using Rocky. Congratulations on successfully running gg.
sudo dnf install upx
sudo upx -d $(which gg)