我该如何解决这个问题:我在 VirtualBox 中有如下所示的四个驱动器,但我想增加我的第一个分区。
dspace@ubuntu:/build/dspace-5.5-src-release$ sudo mvn -U package
[sudo] password for dspace:
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] DSpace Parent Project
[INFO] DSpace Services Framework :: API and Implementation
[INFO] DSpace Kernel :: API and Implementation
[INFO] DSpace Addon Modules
[INFO] DSpace Kernel :: Additions and Local Customizations
[INFO] DSpace XML-UI (Manakin)
[INFO] DSpace XML-UI (Manakin) :: Local Customizations
[INFO] DSpace JSP-UI
[INFO] DSpace JSP-UI :: Local Customizations
[INFO] DSpace RDF
[INFO] DSpace RDF :: Local Customizations
[INFO] DSpace REST :: API and Implementation
[INFO] DSpace REST :: Local Customizations
[INFO] DSpace SWORD
[INFO] DSpace SWORD :: Local Customizations
[INFO] DSpace SWORD v2
[INFO] DSpace SWORD v2 :: Local Customizations
[INFO] Apache Solr Webapp
[INFO] DSpace SOLR :: Local Customizations
[INFO] DSpace OAI-PMH
[INFO] DSpace OAI-PMH :: Local Customizations
[INFO] DSpace Assembly and Configuration
[INFO] DSpace XML-UI Mirage2 Theme
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building DSpace Parent Project 5.5
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-enforcer-plugin:1.2:enforce (enforce-maven) @ dspace-parent ---
[INFO]
[INFO] --- maven-antrun-plugin:1.7:run (native2ascii-utf8) @ dspace-parent ---
[INFO] Executing tasks
Encode any UTF-8 chars in properties:
[INFO] Executed tasks
[INFO]
[INFO] --- maven-assembly-plugin:2.4.1:single (default) @ dspace-parent ---
[INFO] Reading assembly descriptor: src/main/assembly/testEnvironment.xml
[INFO] Processing sources for module project: org.dspace:dspace-services:jar:5.5
[INFO] Processing sources for module project: org.dspace:dspace-api:jar:5.5
[INFO] Processing sources for module project: org.dspace:dspace-xmlui:war:5.5
[INFO] Processing sources for module project: org.dspace:dspace-jspui:war:5.5
[INFO] Processing sources for module project: org.dspace:dspace-rdf:war:5.5
[INFO] Processing sources for module project: org.dspace:dspace-rest:war:5.5
[INFO] Processing sources for module project: org.dspace:dspace-sword:war:5.5
[INFO] Processing sources for module project: org.dspace:dspace-swordv2:war:5.5
[INFO] Processing sources for module project: org.dspace:dspace-solr:war:5.5
[INFO] Processing sources for module project: org.dspace:dspace-oai:war:5.5
[INFO] Processing sources for module project: org.dspace:dspace:pom:5.5
[INFO] Processing sources for module project: org.dspace:dspace-xmlui-mirage2:war:5.5
[INFO] Processing sources for module project: org.dspace:modules:pom:5.5
[INFO] Processing sources for module project: org.dspace:dspace-api:jar:5.5
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] DSpace Parent Project ............................. FAILURE [7.832s]
[INFO] DSpace Services Framework :: API and Implementation SKIPPED
[INFO] DSpace Kernel :: API and Implementation ........... SKIPPED
[INFO] DSpace Addon Modules .............................. SKIPPED
[INFO] DSpace Kernel :: Additions and Local Customizations SKIPPED
[INFO] DSpace XML-UI (Manakin) ........................... SKIPPED
[INFO] DSpace XML-UI (Manakin) :: Local Customizations ... SKIPPED
[INFO] DSpace JSP-UI ..................................... SKIPPED
[INFO] DSpace JSP-UI :: Local Customizations ............. SKIPPED
[INFO] DSpace RDF ........................................ SKIPPED
[INFO] DSpace RDF :: Local Customizations ................ SKIPPED
[INFO] DSpace REST :: API and Implementation ............. SKIPPED
[INFO] DSpace REST :: Local Customizations ............... SKIPPED
[INFO] DSpace SWORD ...................................... SKIPPED
[INFO] DSpace SWORD :: Local Customizations .............. SKIPPED
[INFO] DSpace SWORD v2 ................................... SKIPPED
[INFO] DSpace SWORD v2 :: Local Customizations ........... SKIPPED
[INFO] Apache Solr Webapp ................................ SKIPPED
[INFO] DSpace SOLR :: Local Customizations ............... SKIPPED
[INFO] DSpace OAI-PMH .................................... SKIPPED
[INFO] DSpace OAI-PMH :: Local Customizations ............ SKIPPED
[INFO] DSpace Assembly and Configuration ................. SKIPPED
[INFO] DSpace XML-UI Mirage2 Theme ....................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 9.755s
[INFO] Finished at: Mon Sep 18 04:25:53 EDT 2017
[INFO] Final Memory: 13M/45M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.4.1:single (default) on project dspace-parent: Failed to create assembly: Error filtering file '/build/dspace-5.5-src-release/dspace/config/dspace.cfg': No space left on device -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
注意:我的 Oracle VirtualBox 客户机有 4 GB 硬盘
如何增加 virtualBox 客户机的磁盘大小?
答案1
您的日志中的错误表明:
[ERROR] Failed to execute goal \
org.apache.maven.plugins:maven-assembly-plugin:2.4.1:single (default) \
on project dspace-parent: \
Failed to create assembly: \
Error filtering file '/build/dspace-5.5-src-release/dspace/config/dspace.cfg': \
No space left on device
这意味着您应该从磁盘中删除不需要的文件以便为该程序释放空间。
您可以使用它来查找磁盘上的问题区域,df -h
它会显示每个分区的磁盘使用量。
此 Ask Ubuntu 问答解释如何增加 VirtualBox 客户机的硬盘大小。
答案2
请注意,您有 2GB 用于/
,1GB 用于交换,另外 2GB 用于 ,/var
16GB 用于/home
。基本上,您已为所有操作系统、已安装的程序以及显然/build
用于编译的目录分配了 2GB空间项目。
您可以使用 检查每个分区的可用空间df -h
。 有可能根目录已使用 100%,而 处有一些可用空间/home
。
我认为您想调整/
分区大小。但这可能不是解决方案。
- 调整分区大小:你可以调整分区大小仅当您在分区附近有可用空间时才可以。 可能
/
与交换分区相邻。 然后,您可以尝试启动 LiveCD 并使用gparted
或其他工具删除交换分区并调整 的大小/
。 但是,您只能获得 1GB 空间,并且需要一个新的交换分区。 - 扩展硬盘、调整分区大小并创建新的交换分区:你可以调整硬盘大小,删除交换分区,调整大小
/
并在剩余空间中创建一个新的交换分区。但是,您只能为根分区获得 1GB 的额外空间。
除了这些解决方案之外,您还可以考虑其他解决方案:
- 扩展硬盘并为root创建一个新的分区:你可以调整硬盘大小,使用可用空间创建一个新分区,将文件从移动
/
到新分区,更改/etc/fstab
以 root 身份挂载新分区并配置启动分区。 - 添加新硬盘并将数据移动到那里:你可以向虚拟机添加新的虚拟磁盘,创建一组具有更好布局/大小的分区,将数据移动到那里,然后配置启动分区。您可以稍后删除旧虚拟磁盘,或将其用作附加磁盘。
- 添加新硬盘并在其中创建数据分区:你可以向虚拟机添加新的虚拟磁盘,在那里创建一个新的分区,然后将文件和文件夹移至那里。例如,您可以将
/build
目录移动到新磁盘并创建符号链接以照常访问这些文件夹。 将文件移动到主分区:例如,您可以将
/build
目录(和其他目录)从根目录移动到/home
分区。例如移动到/home/build
文件夹。您可以创建一个符号链接,使用先前的路径访问结果文件夹/build
。$ sudo mv /build /home/. # move /build to the other partition $ sudo ln -s /home/build /build # create a symbolic link
我觉得添加新磁盘并将数据移动到那里是长期的最佳解决方案。您将拥有一个组织得更好的磁盘。但是,如果您现在需要一个解决方案,您可以尝试将文件移动到主分区。