Downloading and installing cnet v4.0.4
cnet has been tested and is supported on the following platforms:
- Apple M-series 'Silicon' processor
(built on macOS Sonoma 14.3)
- Apple with 64-bit Intel processor
(built on macOS Sonoma 14.3)
- Linux on 64-bit Intel processor
(built on Ubuntu 23.10)
and uses the cross-platform
wxWidgets GUI toolkit.
The provided pre-built binaries are statically linked,
and should not have additional dependencies.
However,
cnet protocols are compiled and linked by your native C or C++ compiler
(
clang on macOS, or
gcc on Linux),
so you will require a compiler on your system.
If your platform does not exactly match any platform, above,
try the installation shellscript anyway.
cnet does not run natively on Windows (any offers?)
but you should have success using Windows Subsystem for Linux (WSL-2)
on Windows-11.
On a multiuser system
cnet only needs to be installed once.
Students on such systems do not need to install their own copies unless
they wish to modify and experiment with the cnet implementation
itself.
cnet's version number changes when a change to its source
code affects cnet's execution semantics.
The version number does not change if cosmetic changes are made to the
source code, or if the documentation changes.
If you find these instructions confusing,
but eventually get cnet installed,
please email
[email protected]
with any suggestions on how the instructions could be clearer.
Firstly, for Linux (native or WSL-2)
The pre-built binary for Linux (for both native Linux, and on WSL-2)
has been built on Ubuntu 23.10,
and requires versions of some libraries not available in earlier Ubuntu distributions.
In particular,
if you are running a very standard copy of WSL-2 in Windows,
or have not updated your system for a while,
it is probably running Ubuntu 22.04 (nearly 2 years old).
So, your Linux distribution will likely need updating first - not a difficult task,
but one that will take (about) 10 minutes if you have a good Internet connection
(suggest doing this on-campus).
- Firstly, we need to both update and upgrade your existing system,
and will need to do this from the root acccount.
shell> sudo apt update && sudo apt upgrade -y
- Next, (again as root),
edit the last line of text file /etc/update-manager/release-upgrades.
It probably says "Prompt=lts" and it needs to say "Prompt=normal"
shell> sudo your-favourite-text-editor /etc/update-manager/release-upgrades
- Next, we start the lengthy process of upgrading your current Ubuntu distribution
to Ubuntu 23.10
You will be prompted several times about certain actions - choose the default action, often 'Y'.
shell> sudo do-release-upgrade
- If all appears to have gone smoothly(??),
quit and restart WSL-2.
You should now be able to see that your system has been upgraded to Ubuntu 23.10:
shell> cat /etc/os-release
- When you now (finally) get to install cnet following the instructions,
below,
you may still require some additional packages.
Please report these as you uncover problems.
shell> sudo apt install libsm6
Then, just for WSL-2
A number of students have reported further success by installing an X-windows server on their
Windows machine, to enable Linux GUI programs (running inside WSL-2)
to be displayed on the main Windows display.
-
Follow these instructions
to download and install VcXsrv
from here.
You do not need the other software discussed, like Cypress.
- Run the command (in Linux)
shell> export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2; exit;}'):0.0
for macOS or Linux
- Download the shellscript
install-cnet.sh
- Make the shellscript executable, and run it:
shell> chmod +x install-cnet.sh
shell> ./install-cnet.sh
If all goes well, you should see output similar to:
downloading cnet-Darwin-arm64
installing executable as /usr/local/bin/cnet
downloading cnet-lib.tgz
installing resources in /usr/local/lib/cnet
-rwxr-xr-x 1 chris staff 6275048 Mar 9 03:52 /usr/local/bin/cnet
drwxr-xr-x 81 chris staff 2592 Mar 9 03:52 /usr/local/lib/cnet
- Set a shell alias to remember the executable's location:
shell> alias cnet=/usr/local/bin/cnet
- These instructions will download and install the necessary files,
and set a shell alias for the executable.
However,
the alias is a configuration in the current shell,
and will be forgotten when that shell terminates.
To make the alias persistent
it needs to be added to a file read by your shell when it is first invoked.
Determine your shell:
shell> echo $SHELL
- if your shell is bash,
add the alias
command to the file ~/.bashrc
- if your shell is zsh,
add the alias
command to the file ~/.zshrc
and start a new shell (or a new terminal window).
Removing cnet
To remove the cnet executable and its resources, execute
shell> rm -rf /usr/local/bin/cnet /usr/local/lib/cnet
Building cnet from source
Coming soon ... (are you really sure you wish to do this?)