# Issue installing af\_packet plugin

**URL:** <https://community.zeek.org/t/issue-installing-af-packet-plugin/6054>\
**Category:** Zeek\
**Created:** [March 20, 2020, 10:19pm UTC](https://community.zeek.org/t/issue-installing-af-packet-plugin/6054 "2020-03-20T22:19:54Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kayode\_Enwerem](https://avatars.discourse-cdn.com/v4/letter/k/dbc845/32.png) [@Kayode\_Enwerem](https://community.zeek.org/u/Kayode_Enwerem)\
**Post date:** [March 20, 2020, 10:19pm UTC](https://community.zeek.org/t/issue-installing-af-packet-plugin/6054/1 "2020-03-20T22:19:54Z")

</div>

Hello,

I just finished installing the latest version on zeek (zeek version 3.1.1). Now I am trying install af\_packet plugin to use with zeek but I am encountering the following issues:

When I run:

**zkg install zeek/j-gras/bro-af\_packet-plugin**

I get the following error message:

The following packages will be INSTALLED:

zeek/j-gras/bro-af\_packet-plugin (2.0.0)

Proceed? [Y/n] Y

Running unit tests for “zeek/j-gras/bro-af\_packet-plugin”

Exception in thread Thread-1:

Traceback (most recent call last):

File “/usr/lib64/python2.7/threading.py”, line 812, in \_\_bootstrap\_inner

self.run()

File “/bin/zkg”, line 355, in run

self.package\_name, self.package\_version)

File “/usr/lib/python2.7/site-packages/zeekpkg/manager.py”, line 2203, in install

return self.\_install(matches[0], version)

File “/usr/lib/python2.7/site-packages/zeekpkg/manager.py”, line 2265, in \_install

status.current\_hash = clone.head.object.hexsha

File “/usr/lib/python2.7/site-packages/git/refs/symbolic.py”, line 190, in \_get\_object

return Object.new\_from\_sha(self.repo, hex\_to\_bin(self.dereference\_recursive(self.repo, self.path)))

File “/usr/lib/python2.7/site-packages/git/refs/symbolic.py”, line 132, in dereference\_recursive

hexsha, ref\_path = cls.\_get\_ref\_info(repo, ref\_path)

File “/usr/lib/python2.7/site-packages/git/refs/symbolic.py”, line 181, in \_get\_ref\_info

return cls.\_get\_ref\_info\_helper(repo, ref\_path)

File “/usr/lib/python2.7/site-packages/git/refs/symbolic.py”, line 145, in \_get\_ref\_info\_helper

with open(osp.join(repodir, ref\_path), ‘rt’, encoding=‘UTF-8’) as fp:

TypeError: ‘encoding’ is an invalid keyword argument for this function

Traceback (most recent call last):

File “/bin/zkg”, line 2243, in

main()

File “/bin/zkg”, line 2239, in main

args.run\_cmd(manager, args, config, configfile)

File “/bin/zkg”, line 599, in cmd\_install

print(‘Installed “{}” ({})’.format(name, ipkg.status.current\_version))

AttributeError: ‘NoneType’ object has no attribute ‘status’

Can someone please help me with this?

Thanks in advance

---

<div class="post-metadata">

**Author:** ![Jan](https://avatars.discourse-cdn.com/v4/letter/j/ce7236/32.png) [@Jan](https://community.zeek.org/u/Jan)\
**Post date:** [March 23, 2020, 9:27am UTC](https://community.zeek.org/t/issue-installing-af-packet-plugin/6054/2 "2020-03-23T09:27:08Z")

</div>

To me this looks like an zkg related issue. It seems to require python 3 but is run with 2.7 in your setup.

Jan

---

<div class="post-metadata">

**Author:** ![Kayode\_Enwerem](https://avatars.discourse-cdn.com/v4/letter/k/dbc845/32.png) [@Kayode\_Enwerem](https://community.zeek.org/u/Kayode_Enwerem)\
**Post date:** [March 23, 2020, 1:06pm UTC](https://community.zeek.org/t/issue-installing-af-packet-plugin/6054/3 "2020-03-23T13:06:02Z")

</div>

Any idea how I can resolve the issue?

I used alternatives to switch to using "Python 3" but still getting the same error message.

---

<div class="post-metadata">

**Author:** ![Kayode\_Enwerem](https://avatars.discourse-cdn.com/v4/letter/k/dbc845/32.png) [@Kayode\_Enwerem](https://community.zeek.org/u/Kayode_Enwerem)\
**Post date:** [March 23, 2020, 4:38pm UTC](https://community.zeek.org/t/issue-installing-af-packet-plugin/6054/4 "2020-03-23T16:38:22Z")

</div>

RESOLVED.

I was able to resolve this by using python3.

Thanks

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/zeek/original/1X/f09d732bc2cc7c7cc7e35db67cf4e1d5233ce7a7.png) [@system](https://community.zeek.org/u/system)\
**Post date:** [May 6, 2022, 3:47pm UTC](https://community.zeek.org/t/issue-installing-af-packet-plugin/6054/5 "2022-05-06T15:47:09Z")

</div>


