Error when /etc is not readable
See original GitHub issueOriginally reported in https://github.com/pypa/pip/issues/4320.
Hi, I’m doing scientific computations on a Computer cluster. When the sysadmin decided to remove read permissions from /etc pip stopped working, because
os.listdir(_UNIXCONFDIR)
in distro.py fails.As a quick fix I changed the following in my local pip installation:
try: basenames = os.listdir(_UNIXCONFDIR) # We sort for repeatability in cases where there are multiple # distro specific files; e.g. CentOS, Oracle, Enterprise all # containing `redhat-release` on top of their own. basenames.sort() except OSError: basenames = ["os-release"]
This of course requires
/etc/os-release
to be readable. I just wanted to share this in case someone runs into the same problem!
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
[BUG]macOS FATA /etc/hosts is not readable/writable ... - GitHub
Hitting the same problem, with the latest crc. That file should be remain readable by everyone, and writable only by root as is...
Read more >1819216 – /etc/resolver/testing is not readable/writable by the ...
Description of problem: Error with /etc/resolver after stop. $ crc stop Stopping the OpenShift cluster, this may take a few minutes.
Read more >Fix The Disk You Attached Was Not Readable by This Computer
Summary: Here you'll find 8 efficient methods to fix the disk not readable on Mac issue. Note that the unreadable disk usually means...
Read more >linux - How to fix "E: The list of sources could not be read ...
5 Answers 5 · 1) rm /etc/apt/sources.list · 2) nano /etc/apt/sources.list · 3) paste the following and save: · 4) sudo apt-get update....
Read more >Fix 'The Disk Structure Is Corrupted and Unreadable ... - EaseUS
Method 1. Unplug and Re-plug Corrupted/Unreadable Device [Easiest] ... Applies to: Fix device with structure corrupted or unreadable error due to ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Released v1.0.4 solving this issue. Thanks @SethMichaelLarson (@dstufft)
Thanks a lot!