I am programming a small python module for Unbound, nothing serious at all.
https://framagit.org/22decembre/ipv6-dns-proxy
The trouble is, I cannot manage to start unbound with it on the two environnements I can access : my openbsd server (I needed to compile Unbound because Unbound in base does not have python support compiled) or a debian based desktop (debian bookworm).
Here is my what happens on OpenBSD :
stephane@blackblock:/home/stephane export PYTHONHOME=/usr/local/lib/python3.10/
stephane@blackblock:/home/stephane echo $PYTHONHOME
/usr/local/lib/python3.10/
stephane@blackblock:/home/stephane doas /usr/local/sbin/unbound -d -v
[1690784738] unbound[76230:0] notice: Start of unbound 1.17.1.
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Python path configuration:
PYTHONHOME = (not set)
PYTHONPATH = (not set)
program name = 'unbound'
isolated = 0
environment = 1
user site = 1
import site = 0
sys._base_executable = ''
sys.base_prefix = '/usr/local'
sys.base_exec_prefix = '/usr/local'
sys.platlibdir = 'lib'
sys.executable = ''
sys.prefix = '/usr/local'
sys.exec_prefix = '/usr/local'
sys.path = [
'/usr/local/lib/python310.zip',
'/usr/local/lib/python3.10',
'/usr/local/lib/lib-dynload',
]
Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding
Python runtime state: core initialized
ModuleNotFoundError: No module named 'encodings'
Current thread 0x0000030be8ccbb18 (most recent call first):
<no Python frame>
On Debian :
stephane@penguin:/tmp$ sudo unbound -d -vv
[1690788306] unbound[14200:0] notice: Start of unbound 1.17.1.
[1690788306] unbound[14200:0] debug: switching log to syslog
Traceback (most recent call last):
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'unboundmodule'
I tried to install everything I need there but apparently, I am wrong ?
How do I solve that ? Thank you.