Por que estou recebendo este estranho texto relacionado a permissões sempre que executo o pip2 / pip3 no meu Linux Mint Terminal?

1

Nota: criei esta conta por causa desta questão. :)

Ok, então: vamos começar.

Notei que recebo a seguinte "mensagem" no meu Linux Mint 18.2 Terminal sempre que vou instalar um novo pacote Python usando pip2 / pip3 com sudo (que é necessário para instalar novos pacotes Python usando pip2 / pip3 ):

The directory '/home/kyle/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. The directory '/home/kyle/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.

Por exemplo, aqui está uma "captura de tela" de tipos do meu Terminal quando eu faço uma coisa dessas (claro que não há linhas vazias entre as linhas de saída do Terminal; essa é eu fazendo esta saída legível aqui neste post); acontece a mesma coisa quando substituo pip2 por pip3 :

kyle@kyle-B301 ~ $ sudo pip2 install pytest pytest-cache

The directory '/home/kyle/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.

The directory '/home/kyle/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.

Collecting pytest

Downloading pytest-3.2.2-py2.py3-none-any.whl (187kB)

100% |████████████████████████████████| 194kB 380kB/s

Collecting pytest-cache

Downloading pytest-cache-1.0.tar.gz

Requirement already satisfied: setuptools in /usr/lib/python2.7/dist-packages (from pytest)

Collecting py>=1.4.33 (from pytest)

Downloading py-1.4.34-py2.py3-none-any.whl (84kB)

100% |████████████████████████████████| 92kB 689kB/s

Collecting execnet>=1.1.dev1 (from pytest-cache)

Downloading execnet-1.4.1-py2.py3-none-any.whl (40kB)

100% |████████████████████████████████| 40kB 1.3MB/s

Collecting apipkg>=1.4 (from execnet>=1.1.dev1->pytest-cache)

Downloading apipkg-1.4-py2.py3-none-any.whl

Installing collected packages: py, pytest, apipkg, execnet, pytest-cache

Running setup.py install for pytest-cache ... done

Successfully installed apipkg-1.4 execnet-1.4.1 py-1.4.34 pytest-3.2.2 pytest-cache-1.0

kyle@kyle-B301 ~ $

Como você pode ver, tudo funciona (o que é bom). São apenas essas duas linhas sobre mim, um "sudoer", não "possuindo" diretórios que estão no meu próprio diretório "home" que não faz sentido!

Atualização: Como sugerido por "G-Man", eu corri ls -laR /home/kyle/.cache/pip (eu reduzi para /home/kyle/.cache/pip porque é o diretório "problema"), e os resultados podem ser encontrados aqui ( link ).

Se alguém puder explicar-me a causa dessas mensagens e uma solução para resolver a "aparente" falta de "propriedade" para esses diretórios (com os quais posso navegar facilmente sem sudo permissões), então eu seria muito aprecie isso. Obrigado antecipadamente!

    
por the_ultra_code 02.10.2017 / 02:01

0 respostas