Skip to content

[BUG] 'go.mod' not found and failed to build Polycubectl with automatic installation script #439

@AndreaJsy

Description

@AndreaJsy

Describe the bug

I was unable to automatically install polycube on Ubuntu 20.04 with the recommended commands.

To Reproduce

Steps to reproduce the behavior:

  1. wget https://github.com/polycube-network/polycube/releases/download/v0.9.0/polycube-v0.9.0.zip
  2. unzip polycube-v0.9.0.zip
  3. cd polycube-v0.9.0
  4. ./scripts/install.sh

Expected behavior

Success message & successfully build Polycubectl

Please tell us about your environment:

OS details: cat /etc/*-release

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.6 LTS"
NAME="Ubuntu"
VERSION="20.04.6 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.6 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal

Kernel details: uname -a

Linux U20-04 5.15.0-78-generic #85~20.04.1-Ubuntu SMP Mon Jul 17 09:42:39 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

Polycube Version: polycubectl version

polycubectl: command not found

Polycube Log: Attach the log from /var/log/polycube/polycubed.log

[2023-08-03 15:50:50.727] [polycubed] [info] configuration parameters:
[2023-08-03 15:50:50.728] [polycubed] [info] loglevel: info
[2023-08-03 15:50:50.728] [polycubed] [info] daemon: false
[2023-08-03 15:50:50.728] [polycubed] [info] pidfile: /var/run/polycube.pid
[2023-08-03 15:50:50.728] [polycubed] [info] port: 9000
[2023-08-03 15:50:50.728] [polycubed] [info] addr: localhost
[2023-08-03 15:50:50.728] [polycubed] [info] logfile: /var/log/polycube/polycubed.log
[2023-08-03 15:50:50.728] [polycubed] [info] cubes-dump-file: /etc/polycube/cubes.yaml
[2023-08-03 15:50:50.728] [polycubed] [info] cubes-dump-clean-init: false
[2023-08-03 15:50:50.729] [polycubed] [info] cubes-dump-enable: false
[2023-08-03 15:50:50.729] [polycubed] [info] polycubed starting...
[2023-08-03 15:50:50.729] [polycubed] [info] version HEAD-HASH-NOTFOUND+ [git: (branch/commit): NOT_FOUND/GITDIR-N]
[2023-08-03 15:50:53.728] [polycubed] [error] cannot load ctrl_rx: Failed to load controller_module_rx: -1
[2023-08-03 15:50:53.777] [polycubed] [critical] Error starting polycube: cannot load controller_module_rx

Additional context

My llvm is not 6.0 but 9.0. The error message after I performed step 4 is this:

++ sudo ldconfig
++ [[ -z /home/vbox/go ]]

  • echo 'Install polycube'
    Install polycube
  • cd /home/vbox/polycube-v0.9.0/scripts/..
  • '[' '' == true ']'
  • '[' '' == update ']'
  • mkdir -p build
  • cd build
  • git log -1
    fatal: not a git repository (or any of the parent directories): .git
    ++ error_message
    ++ set +x

Then I tried methods from another issue: #322 and #328 and also the installation documentation
I performed;

  1. cd polycube-v0.9.0/build
  2. cmake ..
  3. make -j $(getconf _NPROCESSORS_ONLN)
  4. sudo make install
    After step 3 I had this error message:

installing polycubectl ...

  • set -e
  • echo 'installing polycubectl ...'
    ++ pwd
  • pwdir=/home/vbox/polycube-v0.9.0/src/polycubectl
  • mkdir -p /home/vbox/go/src/github.com/polycube-network/polycube/src/
  • ln -f -s /home/vbox/polycube-v0.9.0/src/polycubectl /home/vbox/go/src/github.com/polycube-network/polycube/src/
  • cd /home/vbox/go/src/github.com/polycube-network/polycube/src/polycubectl
  • go get ./...
    go: go.mod file not found in current directory or any parent directory.
    'go get' is no longer supported outside a module.
    To build and install a command, use 'go install' with a version,
    like 'go install example.com/cmd@latest'
    For more information, see https://golang.org/doc/go-get-install-deprecation
    or run 'go help get' or 'go help install'.

Error during installation
++ error_message
++ set +x
-- Installing: /usr/share/bash-completion/completions/polycubectl

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions