增加swap空间
来源:互联网 发布:网络红猫 编辑:程序博客网 时间:2024/06/05 16:23
7.collect2: error: ld terminated with signal 9
方法:增加ubuntu的虚拟内存。具体操作如下:
setp1:查看系统虚拟内存,命令:free -m
- carson@carson-pc:~$ free -m
- total used free shared buffers cached
- Mem: 1998 1528 469 0 6 423
- -/+ buffers/cache: 1098 900
- Swap: 2036 361 1675
setp2.创建一个 Swap 文件。
mkdir swap
cd swap
sudo dd if=/dev/zero of=swapfile bs=1024 count=5000000
出现下列提示,上面命令中的 count 即代表swap文件大小,这里是增加5G,即增加的虚拟内存大小。此命令出现如下信息
- 100000+0 records in
- 100000+0 records out
- 102400000 bytes (102 MB) copied, 0.377325 s, 271 MB/s
sudo mkswap swapfile
此命令出现如下信息:
- Setting up swapspace version 1, size = 99996 KiB
- no label, UUID=b26fe88c-11c2-40ad-8139-6e69e96b6b68
sudo swapon swapfile
此时free -m 查看Swap信息
- total used free shared buffers cached
- 1998 <span style="font-family:Arial, Helvetica, sans-serif;"> 1189 809 0 34 624</span>
- -/+ buffers/cache: 530 1468
- Swap: 2134 986 1148
sudo swapoff swapfile
如果需要一直保持这个 swap ,可以sudo -s换到root
然后把它写入 /etc/fstab 文件。
swapfilepath swap swap defaults 0 0
8. In file included from /usr/include/semaphore.h:22:0,
from cts/suite/audio_quality/lib/include/Semaphore.h:21,
from cts/suite/audio_quality/lib/src/Semaphore.cpp:17:
/usr/include/features.h:323:26: fatal error: bits/predefs.h: No such file or directory
compilation terminated.
make: In file included from /usr/include/stdlib.h:25:0,
from cts/suite/audio_quality/lib/src/Adb.cpp:16:
/usr/include/features.h:323:26: fatal error: bits/predefs.h: No such file or directory
compilation terminated.
方法:sudo apt-get install libc6-dev:i386
sudo apt-get install build-essential
sudo apt-get install gcc-multilib
9./bin/sh: gcc: not found
方法:sudo apt-get install gcc,gcc是C的编译器
10.gccgcc: error trying to exec 'cc1plus': execvp: gcc: error trying to exec 'No such file or directory
方法:sudo apt-get install g++,g++是C++的编译器
11. /bin/bash: xmllint: command not found
方法:sudo apt-get install libxml2-utils
12.make[1]: lzma: Command not found
方法:sudo apt-get install lzma
未完待续
- 临时增加swap空间
- Linux增加swap空间
- linux增加swap空间
- linux增加SWAP空间
- 增加swap空间
- ubuntu增加swap空间
- centos增加swap空间
- linux增加swap空间
- redhat 增加swap空间
- linux 增加swap空间
- 增加swap空间
- Linux 增加swap空间
- ubuntu增加swap空间
- linux增加swap空间
- 增加swap空间大小
- linux增加swap空间
- centos增加swap空间
- linux临时增加swap空间
- struts2 mvc视图实例分析
- 算法导论-----图(深度优先搜索)
- AS Atan2函数应用
- OnNcCalcSize改变标题栏等的高度
- vc 字体的创建
- 增加swap空间
- 0042算法笔记——【随机化算法】计算π值和计算定积分
- 深入浅出UML类图
- poj3281 拆点+网络流
- hibernate一级缓存和二级缓存的区别
- 如何在Ubuntu安装EXE文件
- DXP 使用总结
- 显示来客IP地址代码
- 总结几道经典面试笔试题