Skip to content

Commit

Permalink
Merge pull request #416 from mfherbst/path_fix
Browse files Browse the repository at this point in the history
Add sbin paths to PATH
musm authored Apr 15, 2020
2 parents 16cd5f7 + 3b4a09e commit ef49d14
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/dependencies.jl
Original file line number Diff line number Diff line change
@@ -395,7 +395,14 @@ elseif Sys.islinux()
global read_sonames
function read_sonames()
empty!(sonames)
for line in eachline(`ldconfig -p`)

# Some Linux distros do not expose executables from /sbin and /usr/sbin via PATH,
# so we append these here explicitly
ldconfig_path = ENV["PATH"] * ":/usr/local/sbin:/usr/sbin:/sbin"
lines_ldconfig = withenv("PATH" => ldconfig_path) do
eachline(`ldconfig -p`)
end
for line in lines_ldconfig
VERSION < v"0.6" && (line = chomp(line))
m = match(r"^\s+([^ ]+)\.so[^ ]* \(([^)]*)\) => (.+)$", line)
if m !== nothing

0 comments on commit ef49d14

Please sign in to comment.