linux回显冲突,Linux-Binfmt-support-不允许我回显注册

我正在使用ubuntu linux.试图在binfmt中添加对ARM解释器的支持.

我收到权限被拒绝的错误.

刚刚在我的机器上为binfmt添加了支持:—

sudo apt-get install binfmt-support

目录binfmt_misc中的ls:-

ignite@ignite:/proc/sys/fs/binfmt_misc$ls

python2.7 python3.2 register status

binfmt_misc文件系统已正确安装:—

ignite@ignite:/proc/sys/fs/binfmt_misc$mount

/dev/sda8 on / type ext4 (rw,errors=remount-ro)

proc on /proc type proc (rw,noexec,nosuid,nodev)

sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)

none on /sys/fs/fuse/connections type fusectl (rw)

none on /sys/kernel/debug type debugfs (rw)

none on /sys/kernel/security type securityfs (rw)

udev on /dev type devtmpfs (rw,mode=0755)

devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)

tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)

none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)

none on /run/shm type tmpfs (rw,nosuid,nodev)

none on /run/user type tmpfs (rw,noexec,nosuid,nodev,size=104857600,mode=0755)

binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)

gvfsd-fuse on /run/user/ignite/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,user=ignite)

模块已启动&正在运行:—

ignite@ignite:/proc/sys/fs/binfmt_misc$cat /proc/modules | grep binfmt*

binfmt_misc 17260 1 - Live 0x00000000

状态显示已启用:—–

ignite@ignite:/proc/sys/fs/binfmt_misc$cat status

enabled

即使使用sudo也回声注册文件时出错:

ignite@ignite:/proc/sys/fs/binfmt_misc$sudo echo ':arm:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/var/local/rpi/qemu/bin/qemu-arm:' > /proc/sys/fs/binfmt_misc/register

bash: /proc/sys/fs/binfmt_misc/register: Permission denied

为什么不允许我以sudo的身份回显注册?

编辑:—

此命令有效,创建了arm文件夹:—

ignite@ignite$echo "echo ':arm:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/local/bin/qemu-arm:' > /proc/sys/fs/binfmt_misc/register" | sudo sh

ignite@ignite:/proc/sys/fs/binfmt_misc$ls

arm python2.7 python3.2 register status

ignite@ignite:/proc/sys/fs/binfmt_misc$cat arm

enabled

interpreter /usr/local/bin/qemu-arm

flags:

offset 0

magic 7f454c4601010100000000000000000002002800

mask ffffffffffffff00fffffffffffffffffeffffff

但是我无法运行arm可执行文件.这是hello world的预编译程序.

ignite@ignite:~/testing$file a.out

a.out: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 3.6.3, not stripped

ignite@ignite:~/testing$./a.out

/lib/ld-linux-armhf.so.3: No such file or directory

我必须执行chroot来执行此arm可执行文件吗?

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值