Linux增加swap空间大小解决编译错误collect2:ld terminated with signal 9(或11)
编译llvm的时候:collect2:ld terminated with signal 9(或11)
1 Creating a file for 1024 MB size you want:
We will create a /mnt/1024MB.swap swap file and set the permissions so that users cannot read it directly.
[root@localhost mnt]# dd if=/dev/zero of=1024MB.swap bs= count=

chmod /mnt/1024MB.swap
2 Formatting that file to create a swapping device:
mkswap /mnt/1024MB.swap
3 Adding the swap to the running system:
swapon /mnt/1024MB.swap
The additional swap is now available and can be seen by "cat /proc/meminfo or swapon"

4 Making the change permanent:
Edit the /etc/fstab:
vim /etc/fstab
Add this line at the end of the file:
/mnt/1024MB.swap swap swap sw 0 0
Save. After the next reboot the swap will be used automatically.
Linux增加swap空间大小解决编译错误collect2:ld terminated with signal 9(或11)的更多相关文章
- linux增加swap空间的方法小结
起因及背景 近期编译AOSP(android 10.0)是总是遇到内存溢出,查了半天,无果.猜测增加下swap空间大小是否能解决,随即尝试下,果然是如此. 当然,还有其他作法,比如直接增加主机的内存( ...
- Linux增加swap分区大小
1. 查看当前分区情况 free -m 2. 增加 swap 大小, 2G 左右 dd if=/dev/zero of=/var/swap bs=1024 count=2048000 3. 设置交换文 ...
- Linux增加swap空间
1.添加交换文件并设置其大小为12G,使用如下命令 # dd if=/dev/zero of=/home/swapfile bs=1024 count=12288000 12288000+0 reco ...
- Linux系统中增加swap空间大小
在我的树莓派pi3上编译dlib库时,发现由于内存不足导致编译失败.树莓派是1G内存,swap只有50M,因此将swap增加到500M,编译通过.具体设置方法如下: 使用free命令带上m参数,查看s ...
- Ubuntu 增加swap空间大小
1. create a 1G file for the swap. sudo fallocate -l 1G /swapfile we can verify that the correct amou ...
- 树莓派进阶之路 (027) - 在Linux中增加swap空间
原贴地址:http://blog.csdn.net/chinalinuxzend/article/details/1759593 在Linux中增加swap空间 在安装Linux的时候,不知道swa ...
- 在Linux中增加swap空间
转自: http://blog.csdn.net/chinalinuxzend/article/details/1759593 在Linux中增加swap空间 在安装Linux的时候,不知道swap空 ...
- Red Hat linux 如何增加swap空间
按步骤介绍 Red Hat linux 如何增加swap空间 方法/步骤 第一步:确保系统中有足够的空间来用做swap交换空间,我使用的是KVM,准备在一个独立的文件系统中添加一个swap交换文件,在 ...
- Linux学习(十四)磁盘格式化、磁盘挂载、手动增加swap空间
一.磁盘格式化 分好去的磁盘需要格式化之后才可以使用.磁盘分区一般用mke2fs命令或者mkfs.filesystemtype.这个filesystemtype分为ext4,ext3,xfs等等.xf ...
随机推荐
- com.atomikos.datasource.ResourceException: XA resource 'masterDB': resume for XID异常
版权声明:本文为博主原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明. 本文链接:https://blog.csdn.net/u014172271/article/det ...
- P4136 谁能赢呢? 脑子
思路:脑子(教练说是博弈论?) 提交:1次 题解: 结论:若\(n\)为奇数后手胜,若\(n\)为偶数先手胜. 大致证明: 我们发现,若我们把棋盘黑白染色并设左上角为黑色,那么显然有:若\(n\)为奇 ...
- centos7 配置静态ip时出现双ip问题解决
1.先用ifconfig,看看有几个网卡 2.执行vi /etc/sysconfig/network-scripts/ifcfg-eth0最后的网卡名字改为实际的 3.静态ip只需要设置着几个地方,B ...
- LOJ2537. 「PKUWC2018」Minimax [DP,线段树合并]
传送门 思路 首先有一个\(O(n^2)\)的简单DP:设\(dp_{x,w}\)为\(x\)的权值为\(w\)的概率. 假设\(w\)来自\(v1\)的子树,那么有 \[ dp_{x,w}=dp_{ ...
- 用python实现简易学生管理系统
以前用C++和Java写过学生管理系统,也想用Python试试,果然“人生苦短,我用Python”.用Python写的更加简洁,实现雏形也就不到100行代码. 下面上代码 #!/usr/bin/pyt ...
- 第二次博客作业: 函数+进制转换器v1.0beta
一:运行截图 二:介绍函数 1, int panduan1(int n,char a[],int count,int sign)//判断用户是否输入了除数字和a-f范围外的字符 { int i; ; ...
- Git生成本机SSH Key并添加到GitHub中
1.检查电脑里是否有SSH Key 打开git Bash客户端 cd ~/.ssh ls 如果有就会输出下面内容 config id_rsa id_rsa.pub known_hosts 2.创建 邮 ...
- springboot+druid+sqlite遇到的问题
1.springboot中使用druid查询sqlite报错getFetchDirection error ResultSet closed https://blog.csdn.net/u011943 ...
- 安装openssh-server
以前在服务器上装过openssh-server,今天突然想把台式机也打开ssh服务,结果忘了咋弄,稍微百度了一下就弄好了,备忘一下,以后就不用各种百度了. 第一步,安装openssh-server( ...
- 重读APUE(7)-link/unlink与mkdir/rmdir
link–用于创建一个现有文件的链接:实际上是新建一个目录项,指向当前文件的i节点: unlink–用于删除一个现有文件的连接:实际上是对引用i节点的目录项进行删除,并且对链接计数-1:系统会检查文件 ...