install安装程序
提示/usr/下空间不够
Unpacking cpp-13 (13.1.0-8) ...
dpkg: error processing archive /var/cache/apt/archives/cpp-13_13.1.0-8_riscv64.deb (--unpack):
cannot copy extracted data for './usr/libexec/gcc/riscv64-linux-gnu/13/cc1' to '/usr/libexec/gcc/riscv64-linux-gnu/13/cc1.dpkg-new': failed to write (No space left on device)
Preparing to unpack .../gcc-13_13.1.0-8_riscv64.deb ...
Unpacking gcc-13 (13.1.0-8) ...
dpkg: error processing archive /var/cache/apt/archives/gcc-13_13.1.0-8_riscv64.deb (--unpack):
cannot copy extracted data for './usr/libexec/gcc/riscv64-linux-gnu/13/lto1' to '/usr/libexec/gcc/riscv64-linux-gnu/13/lto1.dpkg-new': failed to write (No space left on device)
Errors were encountered while processing:
/var/cache/apt/archives/cpp-13_13.1.0-8_riscv64.deb
/var/cache/apt/archives/gcc-13_13.1.0-8_riscv64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
*df -h*
查看/目录使用了96%
root@starfive:~# df -h
Filesystem Size Used Avail Use% Mounted on
udev 1.7G 117M 1.6G 7% /dev
tmpfs 390M 3.2M 387M 1% /run
**/dev/mmcblk1p4 2.5G 2.3G 123M 96% /**
tmpfs 2.0G 0 2.0G 0% /dev/shm
tmpfs 5.0M 12K 5.0M 1% /run/lock
tmpfs 390M 60K 390M 1% /run/user/110
tmpfs 390M 20K 390M 1% /run/user/0
root@starfive:~#
*fdisk -l*
有28.85G,/即**/dev/mmcblk1p4 **只使用了2.5G左右
root@starfive:~# fdisk -l
Disk /dev/mtdblock0: 256 KiB, 262144 bytes, 512 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mtdblock1: 3 MiB, 3145728 bytes, 6144 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mtdblock2: 1 MiB, 1048576 bytes, 2048 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
GPT PMBR size mismatch (5529599 != 60506111) will be corrected by write.
**Disk /dev/mmcblk1: 28.85 GiB, 30979129344 bytes, 60506112 sectors**
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: E05DB137-41F7-47A6-B1C1-E9BE91A4BC0E
Device Start End Sectors Size Type
/dev/mmcblk1p1 4096 8191 4096 2M HiFive BBL
/dev/mmcblk1p2 8192 16383 8192 4M HiFive FSBL
/dev/mmcblk1p3 16384 221183 204800 100M EFI System
/dev/mmcblk1p4 221184 5527518 5306335 2.5G Linux filesystem
root@starfive:~#
原来是删除原来的/目录的分区,然后重新创建分区,注意删除/所在的分区时先不要w保存,最后创建新的分区再保存。
*fdisk mmcbllk1*
root@starfive:~# fdisk mmcbllk1
Welcome to fdisk (util-linux 2.38.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
fdisk: cannot open mmcbllk1: No such file or directory
root@starfive:~# fdisk /dev/mmcblk1
Welcome to fdisk (util-linux 2.38.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
This disk is currently in use - repartitioning is probably a bad idea.
It's recommended to umount all file systems, and swapoff all swap
partitions on this disk.
*输入p查看*
Command (m for help): p
Disk /dev/mmcblk1: 28.85 GiB, 30979129344 bytes, 60506112 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: E05DB137-41F7-47A6-B1C1-E9BE91A4BC0E
Device Start End Sectors Size Type
/dev/mmcblk1p1 4096 8191 4096 2M HiFive BBL
/dev/mmcblk1p2 8192 16383 8192 4M HiFive FSBL
/dev/mmcblk1p3 16384 221183 204800 100M EFI System
/dev/mmcblk1p4 221184 5527518 5306335 2.5G Linux filesystem
*输入d,然后输入4删除分区4*
Command (m for help): d
Partition number (1-4, default 4): 4
Partition 4 has been deleted.
*输入n然后输入4重新创建分区4,后面都直接回车按照默认参数*
Command (m for help): n
Partition number (4-128, default 4): 4
First sector (34-60506078, default 221184):
Last sector, +/-sectors or +/-size{K,M,G,T,P} (221184-60506078, default 60504063):
Created a new partition 4 of type 'Linux filesystem' and of size 28.7 GiB.
Partition #4 contains a ext4 signature.
*如下提示输入y*
Do you want to remove the signature? [Y]es/[N]o: y
The signature will be removed by a write command.
*输入w写入分区*
Command (m for help): w
The partition table has been altered.
Syncing disks.
*通知内核同步**partprobe /dev/mmcblk1*
root@starfive:~# partprobe /dev/mmcblk1
*再次查看分区lsblk,可以看到根目录/增加到了28.7G*
root@starfive:~# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
mtdblock0 31:0 0 256K 0 disk
mtdblock1 31:1 0 3M 0 disk
mtdblock2 31:2 0 1M 0 disk
mmcblk1 179:0 0 28.9G 0 disk
├─mmcblk1p1 179:1 0 2M 0 part
├─mmcblk1p2 179:2 0 4M 0 part
├─mmcblk1p3 179:3 0 100M 0 part
└─mmcblk1p4 179:4 0 28.7G 0 part /
*扩容** resize2fs /dev/mmcblk1p4*
root@starfive:~# resize2fs /dev/mmcblk1p4
`resize2fs 1.46.6-rc1 (12-Sep-202[ 1019.864399] EXT4-fs (mmcblk1p4): resizing filesystem from 663291 to 7535360 blocks`
2)
Filesystem at /dev/mmcblk1p4 is mounted on /; on-line resizing required
old_desc_blocks = 1, new_desc_blocks = 4
[ 1020.838282] EXT4-fs (mmcblk1p4): resized filesystem to 7535360
The filesystem on /dev/mmcblk1p4 is now 7535360 (4k) blocks long.
通过阐述分区在重新创建分区,最后resize2fs扩展文件系统大小。
扩容后此时根目录就够用了,可以愉快的install程序了。
审核编辑:汤梓红
全部0条评论
快来发表一下你的评论吧 !