Mysterious tilde (~) folder created for downloaded packages


(Anton) #1

Hi!

I can’t install anything using brew anymore. Whenever I try to install anything (such as python3 lately) I am getting the follow error during installation:

$ brew install python3 ==> Installing dependencies for python: gdbm, openssl, readline, sqlite, xz ==> Installing python dependency: gdbm ==> Downloading https://homebrew.bintray.com/bottles/gdbm-1.14.1_1.high_sierra.bottle.tar.gz ######################################################################## 100.0% ==> Pouring gdbm-1.14.1_1.high_sierra.bottle.tar.gz Error: No such file or directory @ rb_sysopen - ~/Library/Caches/Homebrew/gdbm-1.14.1_1.high_sierra.bottle.tar.gz Warning: Bottle installation failed: building from source.

After some investigation I found out that brew seems to create a tilde folder in the folder I am currently running the command from. If I look into that folder I can see the file rb_sysopen is trying to open but I guess brew expects it to be located in my home folder. Does anyone have an idea of why that folder is created and how it can be fixed?

Here is an screen shot showing the issue:

brew version: 1.5.10
OS: High Sierra, 10.13.3

// Anton


(Anton) #2

Found the issue!

For future googlers (future me):

The environment variable $HOMEBREW_CACHE was set to ~/Library/Caches/Homebrew. My colleague didn’t have it at all, so I removed it:

unset HOMEBREW_CACHE

and now it works!