Find the answer to your Linux question:
Results 1 to 7 of 7
Hi, I wanted to install "gcc" because "./configure" isnt working and was looking for a compiler. I got this error and I dont know what to do with it. I ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    luv
    luv is offline
    Just Joined!
    Join Date
    Aug 2004
    Posts
    55

    unable to create file/directory: Read-only file system


    Hi,

    I wanted to install "gcc" because "./configure" isnt working and was looking for a compiler. I got this error and I dont know what to do with it. I Googled it but I cant find a direct solution. I inherited this server and admin isnt here anymore. I hope you can help. Thank you.

    Below is the error:

    apt-get install gcc
    Reading package lists... Done
    Building dependency tree... Done
    The following extra packages will be installed:
    binutils cpp cpp-4.1 gcc-4.1 libssp0
    Suggested packages:
    binutils-doc cpp-doc gcc-4.1-locales make manpages-dev autoconf automake1.9
    libtool flex bison gdb gcc-doc gcc-4.1-doc libc6-dev-amd64 lib64gcc1
    lib64ssp0
    Recommended packages:
    libc6-dev libc-dev libmudflap0-dev
    The following NEW packages will be installed:
    binutils cpp cpp-4.1 gcc gcc-4.1 libssp0
    0 upgraded, 6 newly installed, 0 to remove and 78 not upgraded.
    Need to get 0B/5419kB of archives.
    After unpacking 14.0MB of additional disk space will be used.
    Do you want to continue [Y/n]? y
    (Reading database ... 23229 files and directories currently installed.)
    Unpacking binutils (from .../binutils_2.17-3_i386.deb) ...
    dpkg: error processing /var/cache/apt/archives/binutils_2.17-3_i386.deb (--unpack):
    unable to create `./usr/share/locale/fr/LC_MESSAGES/bfd.mo': Read-only file system
    dpkg-deb: subprocess paste killed by signal (Broken pipe)
    Unpacking cpp-4.1 (from .../cpp-4.1_4.1.1-21_i386.deb) ...
    dpkg: error processing /var/cache/apt/archives/cpp-4.1_4.1.1-21_i386.deb (--unpack):
    unable to create `./usr/bin/cpp-4.1': Read-only file system
    dpkg-deb: subprocess paste killed by signal (Broken pipe)
    Unpacking cpp (from .../cpp_4%3a4.1.1-15_i386.deb) ...
    dpkg: error processing /var/cache/apt/archives/cpp_4%3a4.1.1-15_i386.deb (--unpack):
    error creating directory `./usr/share/doc/cpp': Read-only file system
    Unpacking libssp0 (from .../libssp0_4.1.1-21_i386.deb) ...
    dpkg: error processing /var/cache/apt/archives/libssp0_4.1.1-21_i386.deb (--unpack):
    unable to create `./usr/lib/libssp.so.0.0.0': Read-only file system
    Unpacking gcc-4.1 (from .../gcc-4.1_4.1.1-21_i386.deb) ...
    dpkg: error processing /var/cache/apt/archives/gcc-4.1_4.1.1-21_i386.deb (--unpack):
    error creating directory `./usr/share/doc/gcc-4.1-base/gcc': Read-only file system
    dpkg-deb: subprocess paste killed by signal (Broken pipe)
    Unpacking gcc (from .../gcc_4%3a4.1.1-15_i386.deb) ...
    dpkg: error processing /var/cache/apt/archives/gcc_4%3a4.1.1-15_i386.deb (--unpack):
    unable to create `./usr/bin/c89-gcc': Read-only file system
    Errors were encountered while processing:
    /var/cache/apt/archives/binutils_2.17-3_i386.deb
    /var/cache/apt/archives/cpp-4.1_4.1.1-21_i386.deb
    /var/cache/apt/archives/cpp_4%3a4.1.1-15_i386.deb
    /var/cache/apt/archives/libssp0_4.1.1-21_i386.deb
    /var/cache/apt/archives/gcc-4.1_4.1.1-21_i386.deb
    /var/cache/apt/archives/gcc_4%3a4.1.1-15_i386.deb
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    Sorry for the long message.

  2. #2
    Trusted Penguin Dapper Dan's Avatar
    Join Date
    Oct 2004
    Location
    The Sovereign State of South Carolina
    Posts
    4,630
    It could be that you are out of space. Post the results of:
    Code:
    df
    please.
    Linux Mint + IceWM Registered: #371367 New Members: click here

  3. #3
    Just Joined! garry_3peace's Avatar
    Join Date
    Oct 2008
    Posts
    67
    aah.... I got the same problem with you yesterday

    This happened when I installing X window system by typing this :

    yum groupinstall "X Window System"

    It appear segmentation fault and cause the drive to automatically lock up, thus became read-only. This is normal ( I thought) to prevent the harddisk been written. So I restart the computer and re-install the packages. And this time, success.

  4. $spacer_open
    $spacer_close
  5. #4
    luv
    luv is offline
    Just Joined!
    Join Date
    Aug 2004
    Posts
    55
    I already restarted my machine.

    Here's my fstab:
    # /etc/fstab: static file system information.
    #
    # <file system> <mount point> <type> <options> <dump> <pass>
    proc /proc proc defaults 0 0
    /dev/sda6 / ext3 defaults,errors=remount-ro 0 1
    /dev/sda1 /boot ext3 ro 0 2
    /dev/mapper/data-lv00 /home ext3 nodev,nosuid,noexec,usrquota,grpquota 0 2
    /dev/mapper/data-lv01 /srv/svn ext3 nodev,nosuid,noexec 0 2
    /dev/sda7 /tmp ext3 defaults 0 2
    /dev/sda5 /usr ext3 ro 0 2
    /dev/sda8 /var ext3 defaults 0 2
    /dev/sda9 none swap sw 0 0
    /dev/sdb1 none swap sw 0 0
    /dev/hda /media/cdrom0 udf,iso9660 user,noauto 0 0
    /dev/fd0 /media/floppy0 auto rw,user,noauto 0 0
    And here's "df"

    df -h
    Filesystem Size Used Avail Use% Mounted on
    /dev/sda6 2.8G 225M 2.4G 9% /
    tmpfs 503M 0 503M 0% /lib/init/rw
    udev 10M 72K 10M 1% /dev
    tmpfs 503M 0 503M 0% /dev/shm
    /dev/sda1 464M 18M 423M 4% /boot
    /dev/mapper/data-lv00
    381G 341G 25G 94% /home
    /dev/mapper/data-lv01
    50G 674M 47G 2% /srv/svn
    /dev/sda7 4.6G 138M 4.3G 4% /tmp
    /dev/sda5 2.4G 444M 1.9G 20% /usr
    /dev/sda8 14G 1.3G 12G 10% /var


    Quote Originally Posted by Dapper Dan View Post
    It could be that you are out of space. Post the results of:
    Code:
    df
    please.

  6. #5
    luv
    luv is offline
    Just Joined!
    Join Date
    Aug 2004
    Posts
    55
    I switched to single user mode (init 1), unmounted everything /w "-al" option and ran fsck. The results were clean. Is it safe to say that my disk is ok?

    I tried "mount -o remount,rw /mnt/sda" but it's not working. "/boot" and "/usr" are read-only. I cant install or update because of this problem. Really needing your help here.

    Thanks.

  7. #6
    Linux Guru coopstah13's Avatar
    Join Date
    Nov 2007
    Location
    NH, USA
    Posts
    3,149
    you have
    Code:
    /dev/sda5 /usr ext3 ro 0 2
    the ro means read only, change that to defaults
    Code:
    /dev/sda5 /usr ext3 defaults 0 2
    /dev/sda1 /boot ext3 defaults 0 2
    then reboot machine

  8. #7
    luv
    luv is offline
    Just Joined!
    Join Date
    Aug 2004
    Posts
    55
    oh that fixed! thank you. how come everybody, mostly, on the internet kept saying about fsck and remount and not even mentioned this solution by coopstah13.

    it could have been easier like. hey give me your fstab. try fsck, try remounting or try changing to the values to defaults.

    I'll check on the other server. Thanks again

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •