/tmp directory in Linux Android SDK

前端 未结 15 2187
醉话见心
醉话见心 2020-12-28 15:00

Just to tinker with it, last night I installed the Android Studio/SDK, and both during install and use, it repeatedly blew my 2Gb /tmp partition. Is there any way to tell t

相关标签:
15条回答
  • 2020-12-28 15:54

    You can use a file for your /tmp:

    as root:

    create a file the desired size ((example for a 10 GiB /tmp size):

    dd if=/dev/zero of=/path/to/your/tmp_dir bs=1024M count=10
    

    create a filesystem on it:

    mke2fs -j /path/to/your/tmp_dir
    

    the partition is ready, mount it:

    mount -t ext3 -o loop /path/to/your/tmp_dir /tmp
    

    source : https://www.yourhowto.net/increase-tmp-partition-size-linux/

    0 讨论(0)
  • 2020-12-28 15:57

    Did a little poking around in the code. The solution is to to start the JVM with a command-line argument that overrides the default tmpdir path:

    -Djava.io.tmpdir=whatever

    There may be more subtle ways to do it but all I did was edit .../android-studio/bin/studio.sh to replace

    VM_OPTIONS=""

    with

    VM_OPTIONS="-Djava.io.tmpdir=/mnt/disk5/android/tmp"

    0 讨论(0)
  • 2020-12-28 15:57

    I fought with the "no space left on device" problem for almost a week. (I will not be beaten!) I tried everything I found here and on other sites and the problem continued. I finally got Android studio completely installed and working correctly using the following approach:

    1. I created a folder named PackageOperation01 on a partition with 100G space.
    2. I went to the tmp directory and removed everything I felt was safe to remove, including PackageOperation01 folder.
    3. In the tmp directory I created a link pointing to the new PackageOperation01 folder I had created.
    4. I named the link PackageOperation01. This allowed me to install ALMOST everything.

    I still had two errors (.."no space..."). Going back to the tmp directory I found my link to PackageOperation01 had been removed by the installer and a new directory named PackageOperation07 had been created.

    1. I removed PackageOperation07 from tmp and created a new folder named PackageOperation07 on my large partition beside PackageOperation01.
    2. I recreated the link to my PackageOperation01 folder and created a new link to the PackageOperation07 folder.

    This time Android Studio installed with no errors.

    0 讨论(0)
提交回复
热议问题