问题
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程序了。
审核编辑:汤梓红
声明:本文内容及配图由入驻作者撰写或者入驻合作网站授权转载。文章观点仅代表作者本人,不代表电子发烧友网立场。文章及其配图仅供工程师学习之用,如有内容侵权或者其他违规问题,请联系本站处理。
举报投诉
-
计算机
+关注
关注
19文章
7409浏览量
87690 -
软件
+关注
关注
69文章
4762浏览量
87142 -
程序
+关注
关注
116文章
3773浏览量
80829 -
RISC-V
+关注
关注
44文章
2227浏览量
46000
发布评论请先 登录
相关推荐
昉·星光单板计算机正式发售,加速RISC-V生态发展
在RISC-V Summit 2021大会上,赛昉科技(简称“赛昉”)作为中国RISC-V软硬件生态的领导者,宣布“昉·
发表于 12-09 09:22
•1279次阅读
【昉·星光 2 高性能RISC-V单板计算机体验】VisionFive2开箱+安装Ubuntu
【昉·星光 2 高性能RISC-V单板计算机体验】VisionFive2开箱+安装Ubuntu
发表于 02-21 17:49
【RISC-V专题】赛昉科技昉·星光RISC-V单板计算机首发试用
!
上海赛昉科技作为此次活动的合作厂商,同步上线昉·星光RISC-V单板计算机(VisionFive
发表于 04-14 15:17
RISC-V VisionFive (昉星光单板计算机)系列课程
利用赛昉科技VisionFive单板计算机学习Linux系统第一期:交叉编译是什么第二期:学习和使用RISC-V(第一部分)第三期:在VisionF
发表于 04-15 15:01
【RISC-V专题】昉·星光 2(VisionFive 2)RISC-V单板计算机免费试用
VisionFive 2是全球首款集成3D GPU的高性能量产RISC-V 单板计算机 。与上一代相比,VisionFive
发表于 05-16 11:26
【昉·星光 2 高性能RISC-V单板计算机体验】2更换Debian操作系统
接上两篇:【昉·星光 2 高性能RISC-V单板计算机体验】1初识赛昉科技StarFive -
发表于 08-31 00:03
【RISC-V + OpenCV 计算机视觉】用 VisionFive 2 昉·星光 2 进行物体识别
广泛应用于视频监控、自动驾驶等领域。
基于Debain操作系统和OpenCV框架,赛昉科技在VisionFive 2(昉·星光
发表于 09-08 11:42
评论