60 | | 1. Create a 1GB empty file: |
61 | | `dd if=/dev/zero of=/.swapfile bs=1024 count=1M` |
62 | | 1GB file creation wherever you have space, change the location following your possibilities |
63 | | 2. Create swap: |
64 | | `mkswap /.swapfile` |
65 | | 3. Activate swap: |
66 | | `swapon /.swapfile` |
67 | | 4. check: |
68 | | Check if the swap is recognized with `swapon -s` or `free -m` (swap different from 0) |
69 | | 5. Relaunch your compilation |
70 | | 6. Disable swap: |
71 | | `swapoff /.swapfile` |
72 | | 7. delete file: |
73 | | `rm -f /.swapfile` |
| 60 | If you get an internal error during the make phase on a computer with low memory and/or no swap partition (verify with `free -m` ) you can try the below procedure. |
| 61 | |
| 62 | 1. Create a 1GB empty swap file, (use a drive location that has enough free space): |
| 63 | {{{ |
| 64 | dd if=/dev/zero of=/.swapfile bs=1G count=1M |
| 65 | }}} |
| 66 | 2. Format swap file: |
| 67 | {{{ |
| 68 | mkswap /.swapfile |
| 69 | }}} |
| 70 | 3. Activate swap file: |
| 71 | {{{ |
| 72 | swapon /.swapfile |
| 73 | }}} |
| 74 | 4. Verify swap file is recognized: |
| 75 | {{{ |
| 76 | swapon |
| 77 | }}} |
| 78 | 5. Start/restart your libtorrent build. |
| 79 | 6. Disable swap file: |
| 80 | {{{ |
| 81 | swapoff /.swapfile |
| 82 | }}} |
| 83 | 7. Delete swap file: |
| 84 | {{{ |
| 85 | rm -f /.swapfile |
| 86 | }}} |