davew@chud:~/netlink$ npm list
netlink@ /home/davew/netlink
└── wireguard-tools.js@2.0.0
davew@chud:~/netlink$ uname -a
Linux chud 5.15.0-94-generic #104-Ubuntu SMP Tue Jan 9 15:25:40 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
If I run the following code, it can't find the lib:
/* GNU ld script
Use the shared library, but some functions are only in
the static library, so try that secondarily. */
OUTPUT_FORMAT(elf64-x86-64)
GROUP ( /lib/x86_64-linux-gnu/libc.so.6 /usr/lib/x86_64-linux-gnu/libc_nonshared.a AS_NEEDED ( /lib64/ld-linux-x86-64.so.2 ))
if I rename libc.so and link in libc.so.6 - it will then work again.
However, I still get the same issue when trying to add a peer. (maybe that's related to the above?)
```
davew@chud:~/netlink$ npm list
netlink@ /home/davew/netlink
└── wireguard-tools.js@2.0.0
davew@chud:~/netlink$ uname -a
Linux chud 5.15.0-94-generic #104-Ubuntu SMP Tue Jan 9 15:25:40 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
```
If I run the following code, it can't find the lib:
```javascript
import { wginterface } from "wireguard-tools.js";
const conf = await wginterface.getConfig("wg0");
```
```bash
davew@chud:~/netlink$ npx tsx set.ts
file:///home/davew/netlink/node_modules/rebory/src/index.js:544
process["dlopen"](mod, release);
^
Error: /lib/x86_64-linux-gnu/libc.so: invalid ELF header
at Object.loadRelease (file:///home/davew/netlink/node_modules/rebory/src/index.js:544:38)
at file:///home/davew/netlink/node_modules/wireguard-tools.js/src/wginterface.js:9:85 {
code: 'ERR_DLOPEN_FAILED'
}
```
Here is `libc.so`:
```bash
/* GNU ld script
Use the shared library, but some functions are only in
the static library, so try that secondarily. */
OUTPUT_FORMAT(elf64-x86-64)
GROUP ( /lib/x86_64-linux-gnu/libc.so.6 /usr/lib/x86_64-linux-gnu/libc_nonshared.a AS_NEEDED ( /lib64/ld-linux-x86-64.so.2 ) )
```
if I rename `libc.so` and link in `libc.so.6` - it will then work again.
However, I still get the same issue when trying to add a peer. (maybe that's related to the above?)
```bash
node:internal/process/esm_loader:40
internalBinding('errors').triggerUncaughtException(
^
[Error: File exists, code: -17]
Node.js v20.9.0
```
Thanks,
David
if I rename libc.so and link in libc.so.6 - it will then work again.
I'm using zig to make the pre-compiled binaries, I only have Respeberry Pi with actions runner.
Edit `node_modules/wireguard-tools.js/addons/tools/wginterface-linux.cpp` in the line 332, change to:
```cpp
if (res != -EEXIST) SetError(getKernelMesage(res));
```
remove addon prebuilds and run `prebuild`
```sh
rm -rfv node_modules/wireguard-tools.js/build
./node_modules/.bin/rebory build -w node_modules/wireguard-tools.js
```
> if I rename libc.so and link in libc.so.6 - it will then work again.
I'm using `zig` to make the pre-compiled binaries, I only have Respeberry Pi with actions runner.
I make test to wginterface.ts and get this error, sorry not have test to wireguard interface, now have in set in CI/CD test this
I make test to `wginterface.ts` and get this error, sorry not have test to wireguard interface, now have in set in CI/CD test this

Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
If I run the following code, it can't find the lib:
Here is
libc.so:if I rename
libc.soand link inlibc.so.6- it will then work again.However, I still get the same issue when trying to add a peer. (maybe that's related to the above?)
Thanks,
David
Edit
node_modules/wireguard-tools.js/addons/tools/wginterface-linux.cppin the line 332, change to:remove addon prebuilds and run
prebuildI'm using
zigto make the pre-compiled binaries, I only have Respeberry Pi with actions runner.I make test to
wginterface.tsand get this error, sorry not have test to wireguard interface, now have in set in CI/CD test thisTest this pkg, i build this addon in my wsl
@MorningLightMountain713 waiting for u response
That all works now... can remove / add peers 👍
Thanks, release 2.0.1