Faculty of Engineering and Mathematical Sciences 
Not logged in (login)

help3002


This forum is provided to promote discussion amongst students enrolled in Computer Networks (CITS3002).
 
Before posting a question here, you may like to read the article How To Ask Questions The Smart Way.

If just starting the project, please search this forum for related topics (from Week-8) before posting new questions.
 
Options:
RSS cloud
Jump to:

Installing cnet on your own laptop

28 of 654 articles shown, currently no other people reading this forum.
photo
From: Christopher M.
Date: Sat 14th Mar, 5:48pm
Actions: 
        Login-to-reply
I've received a couple of email asking about help with installing cnet on personal laptops.  
I'll post the questions my answers here as they may help other students, too.

______

    .... while I have managed to get it installed I just have a
    few questions about the current build process.

    My system:
    Majaro Linux (Linux55 kernel)
    (its effectively arch)

    There currently exists a package for cnet on the Arch User repository
    https://aur.archlinux.org/packages/cnet/

(just checked) it's a package created and uploaded by someone else - not a problem that 
someone's done that (it's open-source, after all), but note that it's a bit older than our 
version, and will have some older bugs in it.

    which using standard installation fails due to:

    curl: (60) SSL certificate problem: unable to get local issuer certificate

Fortunately this sounds like their problem; don't let their out-of-date certificate stop you,  
try with another tool, perhaps a browser that simply asked for confirmation, or wget.

    I am working on fixing this issue. Should I managed to get it fixed would
    you be ok with me putting the updated package back up on the AUR as the last
    time it was updated was 2017.

Yes, fine it's open-source with attribution.  Thanks for asking (but I can't stop you :-)


    Secondly, whilst my attempts at doing fun things in VM land have so far
    failed when building from source on my machine I ran into another issue:

    linking cnet
    /usr/bin/ld: cannot find -ltcl8.5
    /usr/bin/ld: cannot find -ltk8.5

    Which was a simple package compatibility issue as my system have version 8.6
    installed to both. I simply had to change lines 27 and 32 (replacing 8.5
    with 8.6) of src/Makefile to get a successful compilation. I am not sure
    weather this is of any use to you but I thought I would make you aware of it regardless.

Yes, this is the problem that most students first hit. Different distributions of Linux and 
macOS have different versions of Tcl/Tk installed, and/or are updated very slowly.  Using 
either Tck/Tk v8.5 or v8.6, cnet should still compile 'quietly', and work similarly without 
any other change.

Installing cnet on your own laptop

photo
From: Christopher M.  O.P.
Date: Sat 14th Mar, 5:53pm
Actions: 
        Login-to-reply
    I want to complete the lab, but I am having trouble installing the program using
    the 'make install' command.
    Even though I used sudo commands like 'sudo' to have the allowed permissions to install.
    Is there anyway you can help me with this ?

Can you provide more detail, perhaps the exact error message produced?

By default 'make install' will attempt to create and populate both /usr/local/bin and /usr/local/lib.

If that turn out to be an ongoing problem, and if it's a personal laptop, you can install things 
elsewhere, such as in your  ~/bin and ~/lib  (and not require root's assistance).
Just uncomment or redefine the value of PREFIX in the top-level Makefile.

Installing cnet on your own laptop

photo
From: ANONYMOUS
Date: Mon 16th Mar, 1:02am
Actions: 
        Login-to-reply
I'm having trouble installing on Mac too.

I don't get any errors if I use sudo make clean && sudo make && sudo make install. But if I try running sudo make 
doc I do get these errors:

mkdir: /home/httpd/html/cnet: Operation not supported
mkdir: /home/httpd/html/cnet/images: Operation not supported

And if I try running cnet TICKTOCK I get "cnet: command not found". I've also changed my PREFIX to ~/local in the 
Makefile but that doesn't make a difference.

Installing cnet on your own laptop

photo
From: Christopher M.  O.P.
Date: Mon 16th Mar, 3:48am
Actions: 
        Login-to-reply
ANONYMOUS wrote:

> I'm having trouble installing on Mac too.
> 
> I don't get any errors if I use sudo make clean && sudo make && sudo make install. But if I try running sudo make 
> doc I do get these errors:
> 
> mkdir: /home/httpd/html/cnet: Operation not supported
> mkdir: /home/httpd/html/cnet/images: Operation not supported

Unsure what that could be.
The only use of mkdir when installing the documentation is the line:

  mkdir -p -m 755 $(DOCDIR) $(DOCDIR)/images

Is that command successful if executed by hand?
Both -p and -m are options supported by both Linux and Mac, so it should work (and previously has).

(wondering why you chose that location for the documentation?
I believe that the default location for global Apache content on Macs is  /Library/WebServer/Documents,
unless you've set up an Apache alias or virtual host?)

 
> And if I try running cnet TICKTOCK I get "cnet: command not found". I've also changed my PREFIX to ~/local in the 
> Makefile but that doesn't make a difference.

Where have you installed cnet?
Is it in a directory that is in your shell's PATH variable?

Installing cnet on your own laptop

photo
From: Shayan R.
Date: Mon 16th Mar, 5:51am
Actions: 
        Login-to-reply
"Christopher McDonald" <chris.                     wrote:

> ANONYMOUS wrote:
> 
> > I'm having trouble installing on Mac too.
> > 
> > I don't get any errors if I use sudo make clean && sudo make && sudo make install. But if I try running sudo make 
> > doc I do get these errors:
> > 
> > mkdir: /home/httpd/html/cnet: Operation not supported
> > mkdir: /home/httpd/html/cnet/images: Operation not supported
> 
> Unsure what that could be.
> The only use of mkdir when installing the documentation is the line:
> 
>   mkdir -p -m 755 $(DOCDIR) $(DOCDIR)/images
> 
> Is that command successful if executed by hand?
> Both -p and -m are options supported by both Linux and Mac, so it should work (and previously has).
> 
> (wondering why you chose that location for the documentation?
> I believe that the default location for global Apache content on Macs is  /Library/WebServer/Documents,
> unless you've set up an Apache alias or virtual host?)
> 
>  
> > And if I try running cnet TICKTOCK I get "cnet: command not found". I've also changed my PREFIX to ~/local in the 
> > Makefile but that doesn't make a difference.
> 
> Where have you installed cnet?
> Is it in a directory that is in your shell's PATH variable?

Cheers Chris, I just changed the location of DOCDIR to what you suggested and it works. 

As for cnet itself, changing PATH didn't do anything but all I have to do was set a shell alias and it worked.

Installing cnet on your own laptop

photo
From: Christopher M.  O.P.
Date: Mon 16th Mar, 9:43am
Actions: 
        Login-to-reply
"Shayan Rasaratnam"                               wrote:

> As for cnet itself, changing PATH didn't do anything but all I have to do was set a shell alias and it worked.

That's great.
Where did you install the cnet binary, and any idea why adding that directory to your PATH did not help?

Installing cnet on your own laptop

photo
From: ANONYMOUS
Date: Mon 16th Mar, 12:51pm
Actions: 
        Login-to-reply
"Christopher McDonald" <chris.                     wrote:

> "Shayan Rasaratnam"                               wrote:
> 
> > As for cnet itself, changing PATH didn't do anything but all I have to do was set a shell alias and it worked.
> 
> That's great.
> Where did you install the cnet binary, and any idea why adding that directory to your PATH did not help?

Not sure. Installed the cnet in a new folder at ~/cnet, but adding that directory to the file /etc/paths doesn't seem to 
affect the output of echo $PATH. I'm not sure whether that's the right way to add a path though.

Installing cnet on your own laptop

photo
From: Christopher M.  O.P.
Date: Mon 16th Mar, 12:58pm
Actions: 
        Login-to-reply
ANONYMOUS wrote:

> Not sure. Installed the cnet in a new folder at ~/cnet, but adding that directory to the file /etc/paths doesn't seem to 
> affect the output of echo $PATH. I'm not sure whether that's the right way to add a path though.

Shouldn't really modify /etc/paths,  that's for global changes to PATH, for all users and all shells.
But if you did, you'd need to fire up a new shell to read in the updated contents.

You only need to modify your *own* PATH variable, perhaps in ~/.bash_profile, with:

  export PATH="$PATH:/path/to/my/cnet/installation"

and then source that file into your current shell (or fire up another shell).

Installing cnet on your own laptop

photo
From: Christopher M.  O.P.
Date: Sat 21st Mar, 5:41pm
Actions: 
        Login-to-reply
    Hello Chris, I am your cits3002 student and have a problem with installing cent. My windows laptop 
    has a virtual machine with ubuntu and ubuntu system on Windows.
    However, on virtual machine, the file like /use/local/lib could not be modified ( I could not move   
    a cnet file into this address, maybe the my ubuntu system on Windows influences that?) Therefore    
    could not use cent. Could you tell me what I should do please?

Hi,  (there's obviously a few autocorrect issues in your question), but if you're actually trying 
/usr/local/lib, then the following suggestion should help.

Edit the text file named Makefile in your top-level cnet directory.
At around line 30, one of the actions for the 'install' target is on two lines:

        @[ ! -w $(BINDIR) ] || \
        ( echo You do not have permission to write to $(BINDIR) ; exit 1 )

Delete those two lines, so that the Makefile now reads:

    install:
             make
             make -p ......

Save your edits, and run 'make install'


    One more question is: For our project. Do we need to use cnet? I can use cnet on lab computer
    but hopefully labs will not be closed in the future.

At this stage, I don't know, because no decisions about the project have been made.
I'm working on the (undesirable) assumption that the CSSE labs, possibly the whole campus, will be 
locked-down within a week.

Installing cnet on your own laptop

photo
From: ANONYMOUS
Date: Sat 21st Mar, 11:45pm
Summary: smile
Actions: 
        Login-to-reply
Hello, does anyone knows how to fix this problem?

mycomputer: cnet TICKTOCK
cnet: cannot locate "host.gif"

Installing cnet on your own laptop

photo
From: Christopher M.  O.P.
Date: Sun 22nd Mar, 5:17am
Actions: 
        Login-to-reply
ANONYMOUS wrote:

> Hello, does anyone knows how to fix this problem?
> 
> mycomputer: cnet TICKTOCK
> cnet: cannot locate "host.gif"

That suggests that you have not followed the instructions, because cnet cannot find its 
images/icons from directory where they need to be.

- did you do both a 'make' and 'make install'?

Run   cnet -v
Near the bottom of its output is should report:

  Using the C header file /usr/local/lib/cnet/cnet.h
  Protocols will be compiled with /usr/bin/cc
  Protocols will be linked with /usr/bin/cc
  Using the Tcl/Tk file /usr/local/lib/cnet/cnet.tcl

On your machine can you see the file host.gif in the same directory as the reported 
cnet.h ?

Installing cnet on your own laptop

photo
From: Ka H.
Date: Sun 22nd Mar, 11:34am
Actions: 
        Login-to-reply
Thanks, that’s ok now

Installing cnet on your own laptop

photo
From: ANONYMOUS
Date: Mon 23rd Mar, 3:49am
Actions: 
        Login-to-reply
Hi Everyone,
I am using Mac os and I have got an error on 

shell> make install
You do not have permission to write to /usr/local/bin

I didn't change anything in MakeFile or preference.h, is this the reason that I 
went wrong? If so, where should I edit in MakeFile and preference.h?

Thanks, guys

Installing cnet on your own laptop

photo
From: Christopher M.  O.P.
Date: Mon 23rd Mar, 3:50am
Actions: 
        Login-to-reply
ANONYMOUS wrote:

> shell> make install
> You do not have permission to write to /usr/local/bin

I think this one:

  https://secure.csse.uwa.edu.au/run/help3002?p=np&a=47

(please read other topics).

Installing cnet on your own laptop

photo
From: ANONYMOUS
Date: Mon 23rd Mar, 12:13pm
Actions: 
        Login-to-reply
So I have installed cnet onto my Ubuntu system and changed all the tcl8.5 to 8.6, run 
the make and make install without any errors, however when I go to create the shell 
alias for where it is located, it cannot locate cnet.h. I've looked in the makefile 
and made sure that it was pointing to lib folder created with make install and cnet.h 
is in there. 

Installing cnet on your own laptop

photo
From: ANONYMOUS
Date: Mon 23rd Mar, 1:02pm
Actions: 
        Login-to-reply
Thank you Chris, It's working now!

Installing cnet on your own laptop

photo
From: Christopher M.  O.P.
Date: Mon 23rd Mar, 1:57pm
Actions: 
        Login-to-reply
ANONYMOUS wrote:

> So I have installed cnet onto my Ubuntu system and changed all the tcl8.5 to 8.6, run 
> the make and make install without any errors, however when I go to create the shell 
> alias for where it is located, it cannot locate cnet.h. I've looked in the makefile 
> and made sure that it was pointing to lib folder created with make install and cnet.h 
> is in there. 

What is your newly created alias - is it to the fullpathname of the cnet binary?

What is the value of your PREFIX in the Makefile?

Installing cnet on your own laptop

photo
From: Lemar H.
Date: Tue 24th Mar, 8:31pm
Actions: 
        Login-to-reply
Hi Chris,
I am trying to install cnet on Ubuntu 18.04.4 LTS (64 bit) running on a virtual machine on Windows, as we no longer have access to the lab machines. My issue is that when performing the "make" recipe, it gets to the 'linking cnet' stage and fails with the error:
/usr/lib64/libelf-0.176.so: No such file or directory
I have checked if that directory even exists, and under /usr I don't even have a /lib64 directory. My tcl and tk files are installed under /usr/lib, as well as libelf-170.so.
I have tried following the steps on your "Linux Installation Requirements" page, and my current versions are:
tcl, tcl-dev, tk, tk-dev all 8.6.0+9, and libelf-dev 0.170-0.4ubuntu1. They are all reporting as the newest versions.
I have looked into the makefile and the src/preferences.h file, and the pathnames are all correct. I also created the /usr/local/lib/cnet directory.
I'm really stumped as to what I need to change in order to fix this issue and quite frustrated as I've spent hours reinstalling a new Linux virtual machine and trying to diagnose this issue (my previous efforts with the SEEDLabs ubuntu 32 bit were not successful and didn't install even the tk-dev files.)

Thank you for any help or pointers you can give me :)

Installing cnet on your own laptop

photo
From: David C.
Date: Tue 24th Mar, 10:24pm
Actions: 
        Login-to-reply
My friend running Ubuntu 18.04.4 LTS (not virtual, the actual thing) had the exact same issue. 
"/usr/lib64/libelf-0.176.so" could not be found when making the binary. 
However, he was able to successfully compile, install and run cnet 3.4.0 .

Installing cnet on your own laptop

photo
From: ANONYMOUS
Date: Tue 24th Mar, 11:44pm
Actions: 
        Login-to-reply
Hey there, I also ran into the same problem when I reached the make part.

I resolved it by opening the makefile under the src folder and navigating to the section for Linux ELF systems.
There is a line "LIBELF = /usr/lib64/libelf-0.176.so", change it to "LIBELF = /usr/lib/x86_64-linux-gnu/libelf-0.170.so".

I am using Windows Subsystem for Linux, hope it works for anyone else who has the same problem.

Installing cnet on your own laptop

photo
From: Christopher M.  O.P.
Date: Wed 25th Mar, 3:50am
Actions: 
        Login-to-reply
"Lemar Haddad"                               wrote:

> I am trying to install cnet on Ubuntu 18.04.4 LTS (64 bit) running on a virtual machine on Windows, as we no longer have access to the lab machines. My issue is that when performing the "make" recipe, it gets to the 'linking cnet' stage and fails with the error:
> /usr/lib64/libelf-0.176.so: No such file or directory

Thanks for pointing out the problem.  My error.

 From cnet's top-level directory, edit  src/Makefile

At lines 37+38 you should see two definitions of LIBELF, one commented out, one not.
'Swap the comments around', so that it just uses

   LIBELF      = -lelf

Then re-run   make

I have made the changes to the distribution on the web.

(why this is different on the RedHat, on CSSE lab machines, I don't know, and now no-one cares anyway)

Installing cnet on your own laptop

photo
From: Alan C.
Date: Mon 30th Mar, 4:28pm
Actions: 
        Login-to-reply
Hi Chris,

I'm having trouble running cnet through Ubuntu using Windows Subsystem for Linux (Windows 10 64-
bit). When I try to run STOPANDWAIT1 the command line displays:

*** warning: DISPLAY variable not defined (setting -W option)

and nothing else pops up until I kill the process. I'm pretty sure the only modifications I made to 
the Makefile were to specify the version of Tcl/Tk isntalled.

Thanks!

Installing cnet on your own laptop

photo
From: Christopher M.  O.P.
Date: Mon 30th Mar, 6:51pm
Actions: 
        Login-to-reply
"Alan Cheng"                               wrote:

> Hi Chris,
> 
> I'm having trouble running cnet through Ubuntu using Windows Subsystem for Linux (Windows 10 64-
> bit). When I try to run STOPANDWAIT1 the command line displays:


Hello Alan,

Have you followed all of the WSL-based instructions, here:

   https://www.csse.uwa.edu.au/cnet/install-all.php

specifically the steps involving  VcXsrv ?

Installing cnet on your own laptop

photo
From: Alan C.
Date: Tue 31st Mar, 10:26am
Actions: 
        Login-to-reply
"Christopher McDonald" <chris.                     wrote:

> "Alan Cheng"                               wrote:
> 
> > Hi Chris,
> > 
> > I'm having trouble running cnet through Ubuntu using Windows Subsystem for Linux (Windows 10 64-
> > bit). When I try to run STOPANDWAIT1 the command line displays:
> 
> 
> Hello Alan,
> 
> Have you followed all of the WSL-based instructions, here:
> 
>    https://www.csse.uwa.edu.au/cnet/install-all.php
> 
> specifically the steps involving  VcXsrv ?

Installing VcXsrv fixed the problem, thanks!

Installing cnet on your own laptop

photo
From: Christopher M.  O.P.
Date: Tue 31st Mar, 10:32am
Actions: 
        Login-to-reply
"Alan Cheng"                               wrote:
 
> Installing VcXsrv fixed the problem, thanks!

Great news; good luck,

Installing cnet on your own laptop

photo
From: ANONYMOUS
Date: Sat 4th Apr, 11:00am
Actions: 
        Login-to-reply
Hi,

I have been facing (neglecting) this problem for a while now, and I thought it is not too 
late to get the labsheets started. 

When I tried to install cnet on my Ubuntu 18.04.4 after I have done the "sudo apt-get 
install tcl tcl-dev tk tk-dev libelf-dev", this issue (as attached below) occurs and I have 
no idea how to solve it. 

I tried to follow the installation guide and it seems like I am missing something out.


Any form of assistance will be much appreciated!

Installing cnet on your own laptop

photo
From: ANONYMOUS
Date: Sun 5th Apr, 3:20pm
Actions: 
        Login-to-reply
The image you have posted indicates that you have not downloaded the cnet archive
You are trying to extract something from an archive that does not exist (in that directory)
You must download cnet to solve this
It seems to unrelated to installing the Tcl/Tk graphics libraries,
I think you've done that correctly

Installing cnet on your own laptop

photo
From: Christopher M.  O.P.
Date: Mon 6th Apr, 4:37am
Actions: 
        Login-to-reply
ANONYMOUS wrote:

> I tried to follow the installation guide and it seems like I am missing something out.

Hi, the previous reply sounds correct - the cnet distribution (file) is not located in the directory 
where you are trying to unpack it.

If you downloaded the distribution on your Windows (+WSL) machine using a Windows browser, then it will 
not have downloaded to your Linux directory, but to somewhere in your Windows C: partition.
 From Linux, I think it'll be in   /mnt/c/Users/USERNAME/Downloads   but you'll need to hunt.

  https://docs.microsoft.com/en-us/windows/wsl/faq#how-do-i-access-my-c-drive
This Page


Program written by: [email protected]
Feedback welcome
Last modified:  8:27am May 24 2020