Skip to content
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

Not working on Centos 6.5 #50

Open
rakesh8081 opened this issue Jul 11, 2019 · 5 comments
Open

Not working on Centos 6.5 #50

rakesh8081 opened this issue Jul 11, 2019 · 5 comments

Comments

@rakesh8081
Copy link

I am trying to build latest possible curl version using nix-bundle for centos 6.5.
The build was done on a Ubuntu 18.0 VM running on Windows. It works pretty fine where it was build, here are the outputs

rakesh@rakesh-VirtualBox:~/src/github.com/nix-bundle$ md5sum ./curl 
4eb3f636f1617114f9df298f761c7bc6  ./curl
rakesh@rakesh-VirtualBox:~/src/github.com/nix-bundle$ ./curl --version
curl 7.64.0 (x86_64-pc-linux-gnu) libcurl/7.64.0 OpenSSL/1.0.2r zlib/1.2.11 libssh2/1.8.0 nghttp2/1.36.0
Release-Date: 2019-02-06
Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp 
Features: AsynchDNS IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz TLS-SRP HTTP2 UnixSockets HTTPS-proxy 
rakesh@rakesh-VirtualBox:~/src/github.com/nix-bundle$ 
rakesh@rakesh-VirtualBox:~/src/github.com/nix-bundle$ ldd ./curl
    not a dynamic executable
rakesh@rakesh-VirtualBox:~/src/github.com/nix-bundle$

however when I use the same binary in a Centos machine running on aws, it doesn't work.
The outputs on Centos is as below:

root@ip-10-xxx-8-xxx tmp]# md5sum ./curl
4eb3f636f1617114f9df298f761c7bc6  ./curl
[root@ip-10-xxx-8-xxx tmp]# ./curl --version
unshare(): Invalid argument
[root@ip-10-xxx-8-xxx tmp]# 
[root@ip-10-xxx-8-xxx tmp]# ldd ./curl
    not a dynamic executable
[root@ip-10-xxx-8-xxx tmp]#

so the question is what exactly went wrong. Please let me know for any additional logs.

@Thra11
Copy link

Thra11 commented Jul 11, 2019

Does the centos machine support user namespaces? Is this possibly the same issue: lucabrunox/nix-user-chroot#9 (nix-bundle uses nix-user-chroot)

@rakesh8081
Copy link
Author

I believe it does. But clearly the kernel version is not >3.x.
Some outputs for more reference.

[root@ip-172-30-14-129 ~]# 
[root@ip-172-30-14-129 ~]# 
[root@ip-172-30-14-129 ~]# uname -a
Linux ip-172-30-14-129 2.6.32-431.11.2.el6.x86_64 #1 SMP Tue Mar 25 19:59:55 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
[root@ip-172-30-14-129 ~]# grep CONFIG_USER_NS /boot/config-$(uname -r)
CONFIG_USER_NS=y
[root@ip-172-30-14-129 ~]# echo $0
-bash
[root@ip-172-30-14-129 ~]# if [[ `sudo cat /boot/config-$(uname -a | awk '{print $3}') |grep '^CONFIG_USER_NS'` == "CONFIG_USER_NS=y" ]]; then echo "You have support for User Namespaces"; else echo "Sorry, you don't have support for User Namespaces"; fi
You have support for User Namespaces
[root@ip-172-30-14-129 ~]# 
[root@ip-172-30-14-129 ~]# unshare
Usage: unshare [options] <program> [args...]
Run program with some namespaces unshared from parent

  -h, --help        usage information (this)
  -m, --mount       unshare mounts namespace
  -u, --uts         unshare UTS namespace (hostname etc)
  -i, --ipc         unshare System V IPC namespace
  -n, --net         unshare network namespace

For more information see unshare(1).
[root@ip-172-30-14-129 ~]# 

@Thra11
Copy link

Thra11 commented Jul 13, 2019

Can you check what the other setting mentioned in that bug is (assuming it exists on your system)

cat /proc/sys/user/max_user_namespaces

@rakesh8081
Copy link
Author

rakesh8081 commented Jul 15, 2019 via email

@viogq
Copy link

viogq commented Oct 6, 2019

I bundled firefox which started up in Manjaro/Arch but cannot display any online page. internal stuff like browsing history works tho.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants