![/sys: cpio: chown 失败 - 只读文件系统(使用 Docker 构建 Passenger RPM)](https://linux22.com/image/34770/%2Fsys%3A%20cpio%3A%20chown%20%E5%A4%B1%E8%B4%A5%20-%20%E5%8F%AA%E8%AF%BB%E6%96%87%E4%BB%B6%E7%B3%BB%E7%BB%9F%EF%BC%88%E4%BD%BF%E7%94%A8%20Docker%20%E6%9E%84%E5%BB%BA%20Passenger%20RPM%EF%BC%89.png)
当我尝试使用 rpm 构建时码头工人适用于 Phusion 乘客 4.0.53 (https://github.com/phusion/passenger_rpm_automation),我收到以下错误。非常感谢任何帮助。
$ ./build -p /srv/passenger_rpm_automation/passenger -P /srv/passenger_rpm_automation/passenger-release-4.0.53 -o /srv/passenger_rpm_automation/out -d 'el6' -a 'x86_64' -c /srv/passenger_rpm_automation/cache
.
.
rpm:passenger:el6:x86_64: 2014-12-11 15:17:10 -- Error unpacking rpm package filesystem-2.4.30-3.el6.x86_64
rpm:passenger:el6:x86_64: 2014-12-11 15:17:10 -- error: unpacking of archive failed on file /sys: cpio: chown failed - Read-only file system
rpm:passenger:el6:x86_64: 2014-12-11 15:17:10 -- /usr/share/info/dir: could not read (No such file or directory) and could not create (No such file or directory)
rpm:passenger:el6:x86_64: 2014-12-11 15:17:10 -- /usr/share/info/dir: could not read (No such file or directory) and could not create (No such file or directory)
.
.
.
rpm:passenger:el6:x86_64: 2014-12-11 15:17:10 -- xz-lzma-compat.x86_64 0:4.999.9-0.5.beta.20091007git.el6
rpm:passenger:el6:x86_64: 2014-12-11 15:17:10 -- zlib.x86_64 0:1.2.3-29.el6
rpm:passenger:el6:x86_64: 2014-12-11 15:17:10 --
rpm:passenger:el6:x86_64: 2014-12-11 15:17:10 -- Failed:
rpm:passenger:el6:x86_64: 2014-12-11 15:17:10 -- filesystem.x86_64 0:2.4.30-3.el6
rpm:passenger:el6:x86_64: 2014-12-11 15:17:10 --
rpm:passenger:el6:x86_64: 2014-12-11 15:17:10 --
rpm:passenger:el6:x86_64: 2014-12-11 15:17:10 -- DEBUG: kill orphans
*** Command failed: /usr/bin/mock --verbose -r epel-6-x86_64 --resultdir '/output/el6-x86_64' --uniqueext passenger-el6-x86_64 rebuild /output/el6-x86_64/passenger-4.0.52-1.el6.src.rpm
----- Task errored: Building binary RPMs -> passenger:el6:x86_64 -----
---------------------------------------------
Current time: 2014-12-11 15:17:10
Start time : 2014-12-11 15:15:45
Duration : 1 min 24 sec
环境:Ubuntu 14.04 LTS 64位 Docker 版本 1.3.2
答案1
可能是安装的文件系统/srv
或者/
是只读的。您应该查看 的输出/proc/mounts
。输出示例:
rootfs / rootfs rw 0 0
/dev/root / ext3 rw,noatime,errors=continue,barrier=1,data=ordered 0 0
devtmpfs /dev devtmpfs rw,size=247996k,nr_inodes=61999,mode=755 0 0
none /proc proc rw,nosuid,nodev,noexec,relatime 0 0
none /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
/proc/bus/usb /proc/bus/usb usbfs rw,relatime 0 0
/dev/vda2 /boot ext3 ro,noatime,errors=continue,barrier=1,data=ordered 0 0
/dev/vda9 /var ext3 rw,noatime,errors=continue,barrier=1,data=ordered 0 0
/dev/vda10 /data ext3 rw,noatime,errors=continue,barrier=1,data=ordered 0 0
tmpfs /dev/shm tmpfs rw,relatime 0 0
devpts /dev/pts devpts rw,relatime,gid=5,mode=620,ptmxmode=000 0 0
tmpfs /vtmp tmpfs rw,relatime,size=65536k 0 0
搜索ro
第四个字段中具有该值的行。上面的输出示例行:
/dev/vda2 /boot ext3 ro,noatime,errors=continue,barrier=1,data=ordered 0 0
然后以读写模式重新挂载文件系统。请注意,如果您通常有一个以只读方式安装的文件系统,那么它一定是有充分理由的。请务必咨询您的系统管理员。