Oniux - Can't compile oniux on Linux Mint

Hello there, why are there no binaries for oniux?

This entire “do it yourself” method is absolutely atricious

Not only does this ridiculous Rust language need gigabytes of garbage downloaded just to complete the simplest task – the provided instructions don’t work, to boot

oniux% cargo install --git https://gitlab.torproject.org/tpo/core/oniux --tag v0.5.0 oniux
    Updating git repository `https://gitlab.torproject.org/tpo/core/oniux`
warning: failed to save last-use data
This may prevent cargo from accurately tracking what is being used in its global cache. This information is used for automatically removing unused data in the cache.

database is locked

Caused by:
  Error code 5: The database file is locked
  Installing oniux v0.5.0 (https://gitlab.torproject.org/tpo/core/oniux?tag=v0.5.0#f92a8b40)
    Updating crates.io index
    Updating git repository `https://gitlab.torproject.org/tpo/core/onionmasq.git`
error: failed to compile `oniux v0.5.0 (https://gitlab.torproject.org/tpo/core/oniux?tag=v0.5.0#f92a8b40)`, intermediate artifacts can be found at `/tmp/cargo-installTV9pFv`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.

Caused by:
  failed to get `onion-tunnel` as a dependency of package `oniux v0.5.0 (/mnt/14tb/.cargo/git/checkouts/oniux-a37b67fa6132af61/f92a8b4)`

Caused by:
  failed to load source for dependency `onion-tunnel`

Caused by:
  Unable to update https://gitlab.torproject.org/tpo/core/onionmasq.git

Caused by:
  object not found - no match for id (5180ceb30cd5402b75ac03c92c6bd66f93cee651); class=Odb (9); code=NotFound (-3)

I tried v0.4.0 as well with the same errors.

I asked Grok about these error codes and it said to try flushing the Cargo cache by doing

# Remove the Git cache where oniux and onionmasq would be stored
rm -rf .cargo/git

# Remove the registry cache (which stores crates.io index and downloaded source)
# This might be less critical for a git-based dependency failure, but good for a fresh start.
rm -rf .cargo/registry

but it doesn’t work either, it just takes a very long time at the Updating stage then errors out, again:

oniux% cargo install --git https://gitlab.torproject.org/tpo/core/oniux --tag v0.5.0 oniux
    Updating git repository `https://gitlab.torproject.org/tpo/core/oniux`
error: object not found - no match for id (f92a8b4002697ab31d23559b941845c4d34b863e); class=Odb (9); code=NotFound (-3)

This is just downright unpleasant and ugly, what the hell is going on with this project?

Hi @frozen, unfortunate that you are experiencing issues with getting oniux to work. I haven’t contributed to oniux but will try to assist you.

I’ll first answer some of your remarks.

This is just downright unpleasant and ugly, what the hell is going on with this project?

The README.md of oniux clearly mentions it is still experimental, meaning that the software is still in the early development and testing stage and is not yet considered available for public use. Hence why there are no binaries available and the installation process is not user-friendly – currently it is only meant to be used by developers wanting to test it.

this ridiculous Rust language

Rust, a relatively new language, is actually the most loved language due to the Stackoverflow survey. It is also a very fast growing language which will be used a LOT in the future. If you are into coding you should definitely take a look into this language. One of the reasons it is popular is that it focuses heavily on safety, making it an optimal choice for Tor projects like oniux.

I agree that the compile time for Rust projects is slow, but on the other side, Rust is the language with the best performance and speed.

To help you with your problem:

I don’t run Linux on my host machine but used a Kali Linux VM to investigate your problem. I however was NOT able to reproduce the issue you’re encountering – The command you provided to install oniux worked perfectly for me.

Sometimes gitlab.torproject.org suffers from “bad weather” and connectivity issues. My first guess is that you were trying to install oniux while the Gitlab instance had some internal issues. I think if you try it again it might just work this time.

Another thing you might try is just cloning the repository and building the binary yourself:

# This will clone the repository in a directory named 'oniux' -- make sure it does not conflict with already existing directories having the same name.
git clone --branch v0.5.0 --single-branch https://gitlab.torproject.org/tpo/core/oniux.git

cd oniux

cargo build --release

When the cargo build --release is finished, it will generate a usable binary with the path ./target/release/oniux.

Could you make another attempt and let me know if it worked for you?


Note: As said before, oniux is still experimental and not yet intended to be used for real-word applications, only for testing and development.

FYI: I’m not an official member of the Tor Project Team.

1 Like

Ubuntu based systems have issues at the moment:

You might have a look at workaround for ubuntu 25 (!14) · Merge requests · The Tor Project / Core / oniux · GitLab but it did not work for me yesterday.

Installed a Debian trixie today and it works like this without any issues:

sudo apt-get install rustup git

rustup default stable

cargo install --git https://gitlab.torproject.org/tpo/core/oniux oniux@0.5.0

./.cargo/bin/oniux curl https://icanhazip.com

¯\_(ツ)_/¯

1 Like

Nice addition. But it seems the issue OP is encountering is rather related to Git instead of the executing of oniux itself.

Thanks.
@frozen already tried using Ubuntu 25.04 and now Mint which is probably based on Ubuntu 24.04 (Noble Numbat). Both won’t work out of the box.

Given the already clearly demonstrated frustration, I decided not to fix git issues which would only lead to more nuisance, but to show a way how @frozen would be able to use oniux after all, without the mentioned problems related to Ubuntu.

1 Like

ubuntu-workaround
This video may help.

1 Like

Yes, after applying your patch and following your video, it works :slight_smile: thank you!

Using it without --arti-cfg arti.toml… why is it needed?

1 Like

My bad, --arti-cfg flag is not needed and ubuntu-25 branch does not have it, I was using ubuntu-25-test1 branch 2 days ago.

1 Like