himanshub16 / ProxyMan

Configuring proxy settings made easy.
https://github.com/himanshub16/ProxyMan/releases/latest/
MIT License
683 stars 108 forks source link

install not working on Ubuntu 18.10 however main.sh works #74

Open tejasvi opened 5 years ago

tejasvi commented 5 years ago
user@love:~/ProxyMan-master$ sudo ./install
Failed to install :(
You can still use it > ./main.sh set

Worked fine in Fedora though.

himanshub16 commented 5 years ago

Well, install doesn't require sudo. It just copies the files to your $HOME/.local/bin so that they are available in $PATH.

Installing using sudo makes it available to the path of root, not user.

If the problem still persists, then the issue might be this one. Let me know if you are able to fix this.

tejasvi commented 5 years ago

It doesn't works either way. Besides I'm using fresh vanilla Ubuntu 18.10 install, so its not an issue.

ilhamfp commented 5 years ago

I second this. Fresh Ubuntu 18.04 failed to install.

ehayik commented 5 years ago

I've the same issue on Linux Mint 19.1 Tessa 64-bit

ehayik commented 5 years ago

Finally I could install it. I moved the ProxyMan folder to /opt and executed the install file

himanshub16 commented 5 years ago

I would need to reproduce this on some Ubuntu machine in order to understand the error. If you could help me get the result of these snippets, it would be helpful:

./install
which proxyman
ls ~/.local/bin
echo $PATH

In a new shell,

which proxyman
ls ~/.local/bin
echo $PATH
bitdaric commented 5 years ago

no working here too. not proxied docker also

himanshub16 commented 5 years ago

@bitdaric What is the issue regarding docker?

tamathews commented 5 years ago

I am having the same issue in Ubuntu 19.04.

thomas@Someones-PC:~/Downloads$ cd ProxyMan-3.1.1/ thomas@Someones-PC:~/Downloads/ProxyMan-3.1.1$ ./install Failed to install :( You can still use it > ./main.sh set thomas@Someones-PC:~/Downloads/ProxyMan-3.1.1$ which proxyman thomas@Someones-PC:~/Downloads/ProxyMan-3.1.1$ ls ~/.local/bin proxyman thomas@Someones-PC:~/Downloads/ProxyMan-3.1.1$ echo $PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/thomas/.dotnet/tools

Entering the same commands in a new shell gives the same results. It functions fine if run using ./main.sh but that is obviously not ideal in the long run.

himanshub16 commented 5 years ago

Seems like I either need to pollute /bin, /usr/bin/, /usr/local/bin. There will certainly be distros creating this issue.

ilhamfp commented 5 years ago

Update: I tried the current version (177 commit) again on Ubuntu 18.04, it works!

EdoardoVarani commented 5 years ago

same issue on ubuntu 19.04 :(

vsvipul commented 5 years ago

Can confirm. Get the same error for Ubuntu 19.

himanshub16 commented 5 years ago

😢

brsanjay commented 4 years ago

I also faced the same problem when i tried to install it in my Debian 9.x vm. The issue is "proxyman" was copied to $HOME/.local/bin but this path was not in my PATH environment location. Mypath: /usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games

Solution: First set the PATH variable in the ~/.bashrc file. Open the file with your text editor and add the following line at the end of it: export PATH="$PATH:$HOME/.local/bin" Then run: $ source ~/.bashrc

Next run the installation: ./install

Now it should complete successfully

nathanbrizzee commented 4 years ago

Thanks @brsanjay . That worked for a fresh Ubuntu 19.10. I had it working in 19.04 but I had to do the same thing there. It looks to me like the install script could/should add an option to add the export PATH line automatically to the .bashrc if the "which proxyman" fails and if the .bashrc file exists. Not sure if this is the best way to fix it but it would work.

safferli commented 4 years ago

I had a similar issue installing this on WSL/Ubuntu 18.04 (LTS). Proxyman installed nicely, but which proxyman did not find the ~/.local/bin folder that was created during the install. If the folder does not exist, Ubuntu doesn't add it to the PATH. When the install script then creates the folder, the current session doesn't have the folder in the PATH.

Solution: source ~/.profile then found the ~/.local/bin folder and correctly added it to PATH; which proxyman then worked perfectly. Note that the install worked in the first place, but the which check at the end of the install script returned nothing.

Perhaps source ~/.profile should be added to the install script before testing if the binary works?

deg0nz commented 4 years ago

I can verify that this issue comes from not having ~/.local/bin in $PATH. I encountered this issue on several machines with Ubuntu and ArchLinux.

ghost commented 4 years ago

in fedora 32 install works ubuntu 20.04 install not working again, but main.sh - works ubuntu software center not proxying using latest release as of now - ProxyMan version 3.1.2

truehumandesign commented 4 years ago

With Ubuntu 20.04 you need to logout and login again for the $HOME/.local/bin path to get added to $PATH. It will just be added if this path is present (see $HOME/.profile). A source $HOME/.profile in the installer script before the which proxyman &> /dev/null would fix this. I am not sure for other distros...