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

cannot install in kali linux #191

Open
Aviral2642 opened this issue Feb 19, 2023 · 10 comments
Open

cannot install in kali linux #191

Aviral2642 opened this issue Feb 19, 2023 · 10 comments

Comments

@Aviral2642
Copy link

there are a lot of errors while installing in kali linux

here is the terminal logs :-

pipx install git+https://github.com/Tib3rius/AutoRecon.git
Traceback (most recent call last):
File "/home/aviral/.local/bin/pipx", line 8, in
sys.exit(cli())
^^^^^
File "/home/aviral/.local/lib/python3.11/site-packages/pipx/main.py", line 819, in cli
return run_pipx_command(parsed_pipx_args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/aviral/.local/lib/python3.11/site-packages/pipx/main.py", line 202, in run_pipx_command
return commands.install(
^^^^^^^^^^^^^^^^^
File "/home/aviral/.local/lib/python3.11/site-packages/pipx/commands/install.py", line 30, in install
package_name = package_name_from_spec(
^^^^^^^^^^^^^^^^^^^^^^^
File "/home/aviral/.local/lib/python3.11/site-packages/pipx/commands/common.py", line 333, in package_name_from_spec
package_name = venv.install_package_no_deps(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/aviral/.local/lib/python3.11/site-packages/pipx/venv.py", line 268, in install_package_no_deps
old_package_set = self.list_installed_packages()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/aviral/.local/lib/python3.11/site-packages/pipx/venv.py", line 348, in list_installed_packages
pip_list = json.loads(cmd_run.stdout.strip())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/json/init.py", line 346, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

what in the world is this ?

@Tib3rius
Copy link
Owner

This is some weird bug with pipx. Can you provide the version of pipx you're using?

I ran into this on my older Kali build, but on 2022.4 it works fine. As you can see by the error log, all the files mentioned are pipx / python related and not AutoRecon, but I'm still unsure why it's happening.

@shgrimm
Copy link

shgrimm commented Feb 20, 2023

Hi! I seem to be running into the same issue. Here my pipx version:

┌──(kali㉿kali)-[~]
└─$ pipx --version
1.1.0

┌──(kali㉿kali)-[~]
└─$ pipx install git+https://github.com/Tib3rius/AutoRecon.git
Traceback (most recent call last):
  File "/home/kali/.local/bin/pipx", line 8, in <module>
    sys.exit(cli())
             ^^^^^
  File "/home/kali/.local/lib/python3.11/site-packages/pipx/main.py", line 819, in cli
    return run_pipx_command(parsed_pipx_args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/kali/.local/lib/python3.11/site-packages/pipx/main.py", line 202, in run_pipx_command
    return commands.install(
           ^^^^^^^^^^^^^^^^^
  File "/home/kali/.local/lib/python3.11/site-packages/pipx/commands/install.py", line 30, in install
    package_name = package_name_from_spec(
                   ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/kali/.local/lib/python3.11/site-packages/pipx/commands/common.py", line 333, in package_name_from_spec
    package_name = venv.install_package_no_deps(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/kali/.local/lib/python3.11/site-packages/pipx/venv.py", line 268, in install_package_no_deps
    old_package_set = self.list_installed_packages()
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/kali/.local/lib/python3.11/site-packages/pipx/venv.py", line 348, in list_installed_packages
    pip_list = json.loads(cmd_run.stdout.strip())
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

@puzzithinker
Copy link

should be caused by the python3.11 update??

@puzzithinker
Copy link

Checked
works fine on Python 3.10.9

got error on Python 3.11.1, can't install
can't even run on an existing installation

@puzzithinker
Copy link

Try this one
pypa/pipx#791

@puzzithinker
Copy link

Try this one pypa/pipx#791

Verified the solution
1.) pyenv install 3.10.9
2.) pyenv global 3.10.9
3.) python3 -m uninstall pipx
4.) rm -rf ~/.local/pipx
5.) pyenv global system
6.) reinstall it following the guide by Tib3rius (pipx method)

@shgrimm
Copy link

shgrimm commented Feb 21, 2023

Thank you! This workaround seems to work!

@A1vinSmith
Copy link

I'm glad you make it work. Although remove ~/.local/pipx/shared and then reinstall-all seems better as we don't need to stick with the old python version. My python 3.11.1 is working well.

Another thing might be worth mentioning about the above method. Pipx now putting these two lines in your bashrc/zshrc

# Created by `pipx` on 2023-02-21 04:40:45
# export PATH="$PATH:/home/kali/.local/bin"

Make sure to move them above your alias for sudo autorecon

<- Put the pipx path before the alias
# autorecon alias
# env path method works, but command highlighting is not 
# alias autorecon="sudo env 'PATH=$PATH' autorecon"

# old and solid
alias autorecon="sudo $(which autorecon)"

@A1vinSmith
Copy link

Also, the issue is purely for pipx, not autorecon. You can't run any of the below commands when facing it. I would reckon to add a few clarifications in the README.md for future reference.

pipx install pycowsay
pipx install --python python3.6 pycowsay
pipx install --python python3.7 pycowsay
pipx install git+https://github.com/psf/black
pipx install git+https://github.com/psf/black.git@branch-name
pipx install git+https://github.com/psf/black.git@git-hash
pipx install https://github.com/psf/black/archive/18.9b0.zip
pipx install black[d]
pipx install 'black[d] @ git+https://github.com/psf/black.git@branch-name'
pipx install --suffix @branch-name 'black[d] @ git+https://github.com/psf/black.git@branch-name'
pipx install --include-deps jupyter
pipx install --pip-args '--pre' poetry
pipx install --pip-args '--index-url=<private-repo-host>:<private-repo-port> --trusted-host=<private-repo-host>:<private-repo-port>' private-repo-package

https://pypa.github.io/pipx/examples/

@A1vinSmith
Copy link

Hi @Aviral2642, I believe you could close this ticket now? Thanks.

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

5 participants