Skip to content

Instantly share code, notes, and snippets.

@iamhowardtheduck
Created June 23, 2025 14:36
Show Gist options
  • Select an option

  • Save iamhowardtheduck/1ce4cfdc798c90140f462f95faddcac2 to your computer and use it in GitHub Desktop.

Select an option

Save iamhowardtheduck/1ce4cfdc798c90140f462f95faddcac2 to your computer and use it in GitHub Desktop.
Install script for Oniux
#!/bin/bash
set -e
# Install build tools and a new GCC
sudo apt-get update
sudo apt-get install -y build-essential pkg-config libssl-dev gcc-12 g++-12
# Set gcc-12 as default
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 100
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 100
# Optionally, auto-select gcc-12
sudo update-alternatives --set gcc /usr/bin/gcc-12
sudo update-alternatives --set g++ /usr/bin/g++-12
# Install Rust non-interactively (auto-accept default)
curl https://sh.rustup.rs -sSf | sh -s -- -y
# Source cargo (add Rust to path for this session)
source "$HOME/.cargo/env"
# Install Oniux from Gitlab at specific tag
cargo install --git https://gitlab.torproject.org/tpo/core/oniux --tag v0.4.0 oniux
# Make oniux executable anywhere
sudo cp ~/.cargo/bin/oniux /usr/local/bin/
@gilles614-lang

Copy link
Copy Markdown

Hello,
I have a problem during the compilation of Oniux 0.4.0 with the message below

Compiling oniux v0.4.0 (/home/ack/.cargo/git/checkouts/oniux-a37b67fa6132af61/7830d62)
error[E0432]: unresolved import onion_tunnel::scaffolding::LinuxScaffolding
--> src/main.rs:25:42
|
25 | use onion_tunnel::{config::TunnelConfig, scaffolding::LinuxScaffolding, OnionTunnel};
| ^^^^^^^^^^^^^----------------
| | |
| | help: a similar name exists in the module: TunnelScaffolding
| no LinuxScaffolding in scaffolding
|
= help: consider importing this struct instead:
onion_tunnel::scaffolding::linux::LinuxScaffolding

error[E0282]: type annotations needed
--> src/main.rs:172:30
|
172 | ... let mut tunnel = OnionTunnel::create_with_fd(scaffolding, tun, TunnelConfig::d...
| ________^
173 | | ... .await
| |
^ cannot infer type

Some errors have detailed explanations: E0282, E0432.
For more information about an error, try rustc --explain E0282.
error: could not compile oniux (bin "oniux") due to 2 previous errors
error: failed to compile oniux v0.4.0 (https://gitlab.torproject.org/tpo/core/oniux?tag=v0.4.0#7830d623), intermediate artifacts can be found at /tmp/cargo-installTyl6g9.
To reuse those artifacts with a future compilation, set the environment variable CARGO_TARGET_DIR to that path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment