-
Notifications
You must be signed in to change notification settings - Fork 173
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
Permission denied (src/ip_resolver.cpp:542) #248
Comments
I just found that the bug only appears on my android 13 device (miui14), so the problem may be caused by android 13. It is strange that ipykernel runs well in termux directly but cannot run in termux-proot. Is it possible to solve the problem? |
As a workaround you can #include <errno.h>
#include <ifaddrs.h>
int getifaddrs(struct ifaddrs **ifap) {
errno = EOPNOTSUPP;
return -1;
} gcc skip_getifaddrs.c -o skip_getifaddrs.so -shared
LD_PRELOAD=/root/skip_getifaddrs.so jupyter notebook --allow-root Proper solution would be probably to ask Besides Overriding |
Hey, same issue here trying to run |
i have not reported it to libzmq maintainers, so you can file the issuse there if you want the issuse to be fixed upatream. |
@HITers2018 I met the same problem today. So how did you deal with it? Have you found a good solution rather than change the cpp file? |
i just use the workaround mentioned above, maybe it is better to get the help from the libzmq maintainers. the workaround is easy and useful, which is just a hook by using LD_PRELOAD. it does not change any cpp source file. |
Yeah, I ended up using the workaround too. I wanted to report the bug but didn't take the time to present it properly to the devs |
I asked Bing to help me write the code for using the getifaddrs function in Android within a proot container. This code does work for me. |
i encoutered the same probem in a flutter based code-server gui app, but it seems that no option is available in code-server to add the environment variable, is there any way to fix the problem, or how to make it work in vscode? |
Actually, I gave it up long ago.But I remember that before I gave it up, I used the proot environment to run the code-server or the jupyter. And that works. You can refer to my blog And follow my steps to make it work.My blog is written in Chinese, and you may try to use Google translator to understand it. |
OK, I realize you have to run the full command each time. LD_PRELOAD=/root/skip_getifaddrs.so jupyter lab --allow-root This works! Yay!! |
congratulation, actually even i fail from time to time. this proot is not that stable. |
For reference, this was the full list of steps I followed to successfully install Ubuntu in Termux via https://www.notion.so/josesho/Installing-Analytics-Stack-in-Termux-4a6ff82d32974db4a4de27ee5e24ba45 |
I managed to patch libzmq by changing EINVAL(22) to EACCES(13), So zmq can return before the assertion fail. |
Won't that work only for the specific build you have? |
I tried to use @michalbednarski's workaround. But, after starting jupyter with
Did anyone face the same issue? |
I guess the latest proot or proot-distro may have some bugs. If I install python and jupyter notebook in termux directly , ipykernel can work well. But if I install python and jupyter notebook in alpine (with the latest proot-distro), it gets the err 'Permission denied (src/ip_resolver.cpp:542)' and the ipykernel cannot start. The bug also influence users who upgrade proot and proot-distro.
Here are the codes I use to install python and jupyter notebook.
if you run

jupyter notebook --allow-root
and open a notebook, console displays the err 'Permission denied (src/ip_resolver.cpp:542)' and the ipykernel cannot start.The text was updated successfully, but these errors were encountered: