Skip to content

Allow setting of path #17

@avantgardnerio

Description

@avantgardnerio

I am currently receiving the error:

error while loading shared libraries: libjvm.so: cannot open shared object file: No such file or directory

I understand I can manually set an LD_LIBRARY_PATH to prevent that, however this is burdensome for developers. I would much prefer to:

    if env::var("LD_LIBRARY_PATH").is_err() {
        if let Ok(path) = which("java") {
            let lib = path.canonicalize().unwrap().parent().unwrap().parent().unwrap().join("lib").join("server");
            println!("lib={}", lib.display());
            env::set_var("LD_LIBRARY_PATH", lib);
        }
    }

But even when I call that code as the first line of my test, I see I get the error before my code gets hit. Is it possible fs-hdfs3 is trying to load libraries in a lazy_static block or something? Is there another option for me to make this zero-setup for the devs on my team?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions