推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
bytenoob
V2EX  ›  Python

求助! mac 下所有程序使用的临时目录都指向/tmp

  •  
  •   bytenoob ·
    bufrr · May 2, 2016 · 3035 views
    This topic created in 3670 days ago, the information mentioned may be changed or developed.

    $brew install hadoop

    Error: No such file or directory - /tmp/homebrew20160502-5838-133epnv

    开启其他程序,总显示 tmp 目录不存在。

    事实上/tmp目录并不存在 tmp -> private/tmp

    mkdir /tmp

    mkdir: /tmp: File exists

    cd /tmp

    cd: no such file or directory: /tmp

    $env

    TMPDIR=/var/folders/8l/mn3whrl17sx2kyfsrkklfczr0000gn/T/

    误删了 home 目录下的所有 .*

    文件之后就变成这样了

    google 了半天没到到解决方法,求助一下大家。是哪个环境变量的问题吗?

    6 replies    2016-05-03 18:23:05 +08:00
    pimin
        1
    pimin  
       May 2, 2016 via Android
    export HOMEBREW_TEMP="/usr/local/Cellar/"
    这句写到.bash_profile 试试
    wwwjfy
        2
    wwwjfy  
       May 2, 2016
    可以看看 `mktemp` 和 `$TMPDIR` 有没有问题
    bytenoob
        3
    bytenoob  
    OP
       May 2, 2016
    @pimin brew
    可以了 但是不知道其他 tmp 的问题是怎么回事。。。
    bytenoob
        4
    bytenoob  
    OP
       May 2, 2016
    @wwwjfy 都没问题啊~
    chzyer
        5
    chzyer  
       May 3, 2016   ❤️ 1
    你手动给 /tmp 建个软链到 /private/tmp 就可以了吧?
    bytenoob
        6
    bytenoob  
    OP
       May 3, 2016
    @chzyer 事实上是不小心删掉了 /private/var/tmp 跟同事的 mac 对比后才发现的 新建文件夹 给权限 就好了
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   951 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 21:16 · PVG 05:16 · LAX 14:16 · JFK 17:16
    ♥ Do have faith in what you're doing.