Bluto icon indicating copy to clipboard operation
Bluto copied to clipboard

import dns.resolver ImportError: No module named dns.resolver

Open AdvayCoder opened this issue 3 years ago • 16 comments

Hello! I am running Bluto but I get this error:

File "/usr/local/bin/bluto", line 43, in import dns.resolver ImportError: No module named dns.resolver

How do I fix this? Thank you!

AdvayCoder avatar Jun 07 '21 23:06 AdvayCoder

Hi, what version of python are you running?

darryllane avatar Jun 08 '21 11:06 darryllane

I am on the latest version of Kali Linux. There I cannot run just the "bluto" command because it defaults to running python 3. I ran the command "python /usr/local/bin/bluto" and it gave me this error. When I run the command "python" I am running version 2.7.18.

AdvayCoder avatar Jun 08 '21 11:06 AdvayCoder

Is there a solution?

AdvayCoder avatar Jun 08 '21 15:06 AdvayCoder

Well the simple answer is to install the missing lib. Pip install 'libname' but a better approach is for me to try recreate the issue and build a fix if needs be. So if you can let me know how you installed it I'll try take a look tonight

On Tue, 8 Jun 2021, 16:06 Advay, @.***> wrote:

Is there a solution?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/darryllane/Bluto/issues/48#issuecomment-856850748, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACCS5ZN2CPR4WBI6ZSMS23DTRYWYXANCNFSM46IVQHEQ .

darryllane avatar Jun 08 '21 15:06 darryllane

Ok. Here is what I did on Kali Linux:

I ran "sudo pip install bluto"

Then, once it installed, I ran "python /usr/local/bin/bluto" (Since just running "bluto" makes it run in python 3, and gives other errors).

It then gives me the error, which is: Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/Bluto/bluto", line 43, in import dns.resolver ImportError: No module named dns.resolver

I made an alias called "bluto" that makes it run the python2 bluto command above in .zshrc. Thank you for taking the time to fix the issue!

AdvayCoder avatar Jun 08 '21 17:06 AdvayCoder

Is there a solution?

AdvayCoder avatar Jun 08 '21 21:06 AdvayCoder

I'm guessing when it installed it didn't install fully in python2. Try this using pip for python2, sudo pip install dnspython

darryllane avatar Jun 09 '21 08:06 darryllane

I installed dnspython, but it installed to the python 3 lib, so I moved it to the python 2.7 dist-packages in /usr/local/lib/python2.7/dist-packages/, and then I ran the command "bluto" (correctly aliased to run the command in python 2). I ran it again, but it gives the same error, meaning that it cannot import it correctly. Do I need to move it into the "Bluto" folder, somewhere else inside that folder, or in '/usr/bin/bin/bluto'? Sorry, I am new to python so I am not sure where the dnspython folder needs to be. Thank you!

AdvayCoder avatar Jun 09 '21 10:06 AdvayCoder

Moving the python3 install into the python 2 distro won't work. You need to install with pip2.x

darryllane avatar Jun 09 '21 10:06 darryllane

When I do "sudo pip install dnspython" it says "Requirement already satisfied: dnspython in /usr/lib/python3/dist-packages (2.0.0)", which means that it "pip" is installing to python3 instead of python 2, just like "pip3".

AdvayCoder avatar Jun 09 '21 13:06 AdvayCoder

Yo, I have the same issue. Ever figure it out?

nathanzebedee avatar Sep 17 '21 18:09 nathanzebedee

I'd uninstall it and install it correctly. Or install the lib correctly rather than shifting it around.

On Wed, 9 Jun 2021, 11:47 Advay, @.***> wrote:

I installed dnspython, but it installed to the python 3 lib, so I moved it to the python 2.7 dist-packages in /usr/local/lib/python2.7/dist-packages/, and then I ran the command "bluto" (correctly aliased to run the command in python 2). I ran it again, but it gives the same error, meaning that it cannot import it correctly. Do I need to move it into the "Bluto" folder, somewhere else inside that folder, or in '/usr/bin/bin/bluto'? Sorry, I am new to python so I am not sure where the dnspython folder needs to be. Thank you!

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/darryllane/Bluto/issues/48#issuecomment-857591432, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACCS5ZNMCNUBQSNEOTFO4B3TR5BENANCNFSM46IVQHEQ .

darryllane avatar Sep 17 '21 23:09 darryllane

How would you “install it correctly” exactly?

On Fri, Sep 17, 2021 at 6:02 PM Darryl @.***> wrote:

I'd uninstall it and install it correctly. Or install the lib correctly rather than shifting it around.

On Wed, 9 Jun 2021, 11:47 Advay, @.***> wrote:

I installed dnspython, but it installed to the python 3 lib, so I moved it to the python 2.7 dist-packages in /usr/local/lib/python2.7/dist-packages/, and then I ran the command "bluto" (correctly aliased to run the command in python 2). I ran it again, but it gives the same error, meaning that it cannot import it correctly. Do I need to move it into the "Bluto" folder, somewhere else inside that folder, or in '/usr/bin/bin/bluto'? Sorry, I am new to python so I am not sure where the dnspython folder needs to be. Thank you!

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/darryllane/Bluto/issues/48#issuecomment-857591432, or unsubscribe < https://github.com/notifications/unsubscribe-auth/ACCS5ZNMCNUBQSNEOTFO4B3TR5BENANCNFSM46IVQHEQ

.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/darryllane/Bluto/issues/48#issuecomment-922124571, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUJR2IYRMYH3VM22WXCRGEDUCPCIHANCNFSM46IVQHEQ .

nathanzebedee avatar Sep 17 '21 23:09 nathanzebedee

Install it as you did but with python 2.x

darryllane avatar Sep 19 '21 18:09 darryllane

But how would you do that since pip2 is no longer in kali. Atleast not in my version of kali.

getJobLength avatar Nov 09 '21 15:11 getJobLength

Hi, I'd suggest googling how to install pip2 and python 2.7 on Kali.

darryllane avatar Nov 09 '21 15:11 darryllane