Rust package error with torch sys 0.13 already installed libtorch

┌──(bored㉿kali)-[~/rust/bert/src]
└─$ cargo build
   Compiling torch-sys v0.13.0
error: failed to run custom build command for `torch-sys v0.13.0`

Caused by:
process didn't exit successfully: /home/bored/rust/bert/target/debug/build/torch-sys-486e4d510f9cceb4/build-script-build (exit status: 1)
--- stdout
cargo:rerun-if-env-changed=LIBTORCH_USE_PYTORCH
cargo:rerun-if-env-changed=LIBTORCH

--- stderr
Error:
Cannot find a libtorch install, you can either:

  • Install libtorch manually and set the LIBTORCH environment variable to appropriate path.
  • Use a system wide install in /usr/lib/libtorch.so.
  • Use a Python environment with PyTorch installed by setting LIBTORCH_USE_PYTORCH=1

See the readme for more details:
https://github.com/LaurentMazare/tch-rs/blob/main/README.md

What have you done to install libtorch? Have you followed the instructions listed in the README linked in the error message?

I installed it the same way it was specified in the README file and also set the LIBTORCH path variable as specified it doesnt seem to work