I am attempting to create my first build of OpenCog, but running into an issue. I am completely new at this, and here is my best attempt to outline my experience in the hopes of resolving the issue.
It looks to me that the root of the issue is a failure to install Python 3 from the expected packages, which command appears to be rooted in this ocpkg script.
I am running:
MacOS MacOS 10.13.6
VirtualBox 6.1.22
Vagrant 2.2.16
Following instructions here:
https://wiki.opencog.org/w/Building_OpenCog_in_a_Linux_Virtual_Machine_on_Mac_OS_X
Here is my experience (I've done this 3 times now, same issues):
I am able to create the appropriate directory, opencog_repos, clone the GitHub file into it, and create the symbolic link to the vagrant box.
I am able to vagrant up, and the program successfully downloads and assigns the xenial64 vagrant box, creates the appropriate ssh key, mount shared folders.
The vagrant provisioner: shell initiates, and the inline script starts, and downloads the https://raw.githubusercontent.com/opencog/ocpkg/master/ocpkg
/tmp/octool successfully saves, and vagrant begin running the second provisioner: shell, and running the second inline script. It begins to add repositories, and I see this (issue toward the bottom):
default: [octool] Adding software repositories...
default: Hit:1 http://archive.ubuntu.com/ubuntu xenial InRelease
default: Get:2 https://esm.ubuntu.com/infra/ubuntu xenial-infra-security InRelease [7,503 B]
default: Get:3 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB]
default: Get:4 https://esm.ubuntu.com/infra/ubuntu xenial-infra-updates InRelease [7,475 B]
default: Get:5 https://esm.ubuntu.com/infra/ubuntu xenial-infra-security/main amd64 Packages [99.4 kB]
default: Get:6 http://archive.ubuntu.com/ubuntu xenial-backports InRelease [107 kB]
default: Get:7 http://security.ubuntu.com/ubuntu xenial-security InRelease [109 kB]
default: Get:8 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages [7,532 kB]
default: Get:9 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 Packages [785 kB]
default: Get:10 http://security.ubuntu.com/ubuntu xenial-security/universe Translation-en [225 kB]
default: Get:11 http://security.ubuntu.com/ubuntu xenial-security/multiverse amd64 Packages [7,864 B]
default: Get:12 http://security.ubuntu.com/ubuntu xenial-security/multiverse Translation-en [2,672 B]
default: Get:13 http://archive.ubuntu.com/ubuntu xenial/universe Translation-en [4,354 kB]
default: Get:14 http://archive.ubuntu.com/ubuntu xenial/multiverse amd64 Packages [144 kB]
default: Get:15 http://archive.ubuntu.com/ubuntu xenial/multiverse Translation-en [106 kB]
default: Get:16 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages [2,049 kB]
default: Get:17 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages [1,219 kB]
default: Get:18 http://archive.ubuntu.com/ubuntu xenial-updates/universe Translation-en [358 kB]
default: Get:19 http://archive.ubuntu.com/ubuntu xenial-updates/multiverse amd64 Packages [22.6 kB]
default: Get:20 http://archive.ubuntu.com/ubuntu xenial-updates/multiverse Translation-en [8,476 B]
default: Get:21 http://archive.ubuntu.com/ubuntu xenial-backports/main amd64 Packages [9,812 B]
default: Get:22 http://archive.ubuntu.com/ubuntu xenial-backports/main Translation-en [4,456 B]
default: Get:23 http://archive.ubuntu.com/ubuntu xenial-backports/universe amd64 Packages [11.3 kB]
default: Get:24 http://archive.ubuntu.com/ubuntu xenial-backports/universe Translation-en [4,476 B]
default: Fetched 17.3 MB in 7s (2,175 kB/s)
default: Reading package lists...
default: [octool] Installing python3 ....
default: Reading package lists...
default: Building dependency tree...
default: Reading state information...
default: E
default: :
default: Unable to locate package python3.8-dev
default: E
default: :
default: Couldn't find any package by glob 'python3.8-dev'
default: E
default: :
default: Couldn't find any package by regex 'python3.8-dev'
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.
(The issue appears to me to stem from the command on line 909 of this ocpkg script; this command does not appear to execute as expected on my machine)
I am able to ssh into the vagrant machine, even after this fails; I can move around the directories, and everything appears to be in place. However, I am not able to cmake....I suspect the build did not finish after python did not successfully install.
I attempted to manually download a version of python 3.8, which got me further along the process, but then I ran into other issues, which I solved manually, and ran into still further issues. Again, I suspect it is because the build did not complete after the failure to load the python package expected, and so it was not a simple fix. I can describe those issues if it might help.
My entire terminal process, from start of directory build to cmake error is as follows (I've added some manual spacing, to hopefully make it easier to read):
bash-3.2$ mkdir opencog_repos
bash-3.2$ cd opencog_repos/
bash-3.2$ git clone https://github.com/opencog/opencog
Cloning into 'opencog'...
remote: Enumerating objects: 221451, done.
remote: Counting objects: 100% (325/325), done.
remote: Compressing objects: 100% (221/221), done.
remote: Total 221451 (delta 174), reused 188 (delta 100), pack-reused 221126
Receiving objects: 100% (221451/221451), 181.79 MiB | 4.48 MiB/s, done.
Resolving deltas: 100% (170413/170413), done.
bash-3.2$ ln -s $PWD/opencog/lib/Vagrantfile Vagrantfile
bash-3.2$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Preparing master VM for linked clones...
default: This is a one time operation. Once the master VM is prepared,
default: it will be used as a base for linked clones, making the creation
default: of new VMs take milliseconds on a modern system.
==> default: Importing base box 'ubuntu/xenial64'...
==> default: Cloning VM...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'ubuntu/xenial64' version '20210623.0.0' is up to date...
==> default: Setting the name of the VM: opencog-dev
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
default: Adapter 2: hostonly
==> default: Forwarding ports...
default: 5000 (guest) => 5000 (host) (adapter 1)
default: 17001 (guest) => 17001 (host) (adapter 1)
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
default: Warning: Connection reset. Retrying...
default:
default: Vagrant insecure key detected. Vagrant will automatically replace
default: this with a newly generated keypair for better security.
default:
default: Inserting generated public key within guest...
default: Removing insecure key from the guest if it's present...
default: Key inserted! Disconnecting and reconnecting using new SSH key...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
default: The guest additions on this VM do not match the installed version of
default: VirtualBox! In most cases this is fine, but in rare cases it can
default: prevent things such as shared folders from working properly. If you see
default: shared folder errors, please make sure the guest additions within the
default: virtual machine match the version of VirtualBox you have installed on
default: your host and reload your VM.
default:
default: Guest Additions Version: 5.1.38
default: VirtualBox Version: 6.1
==> default: Setting hostname...
==> default: Configuring and enabling network interfaces...
==> default: Mounting shared folders...
default: /home/vagrant/opencog => /Users/bertbennett/opencog_repos
==> default: Running provisioner: shell...
default: Running: inline script
default: --2021-07-08 06:57:43-- https://raw.githubusercontent.com/opencog/ocpkg/master/ocpkg
default: Resolving raw.githubusercontent.com (raw.githubusercontent.com)...
default: 185.199.109.133
default: ,
default: 185.199.108.133
default: ,
default: 185.199.111.133
default: , ...
default: Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.109.133|:443...
default: connected.
default: HTTP request sent, awaiting response...
default: 200 OK
default: Length:
default: 40932
default: (40K)
default: [text/plain]
default: Saving to: '/tmp/octool'
default:
default: 0K
default:
default: .
default: .
default: .
default: .
default: .
default: .
default: .
default: .
default: .
default: .
default:
default: .
default: .
default: .
default: .
default: .
default: .
default: .
default: .
default: .
default: .
default:
default: .
default: .
default: .
default: .
default: .
default: .
default: .
default: .
default: .
default: .
default:
default: .
default: .
default: .
default: .
default: .
default: .
default: .
default: .
default: .
default:
default:
default:
default:
default:
default:
default:
default:
default:
default:
default:
default:
default: 100%
default: 1.63M
default: =0.02s
default:
default:
default: 2021-07-08 06:57:45 (1.63 MB/s) - '/tmp/octool' saved [40932/40932]
==> default: Running provisioner: shell...
default: Running: inline script
default: [octool] Adding software repositories...
default: Hit:1 http://archive.ubuntu.com/ubuntu xenial InRelease
default: Get:2 https://esm.ubuntu.com/infra/ubuntu xenial-infra-security InRelease [7,503 B]
default: Get:3 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB]
default: Get:4 https://esm.ubuntu.com/infra/ubuntu xenial-infra-updates InRelease [7,475 B]
default: Get:5 https://esm.ubuntu.com/infra/ubuntu xenial-infra-security/main amd64 Packages [99.4 kB]
default: Get:6 http://archive.ubuntu.com/ubuntu xenial-backports InRelease [107 kB]
default: Get:7 http://security.ubuntu.com/ubuntu xenial-security InRelease [109 kB]
default: Get:8 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages [7,532 kB]
default: Get:9 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 Packages [785 kB]
default: Get:10 http://security.ubuntu.com/ubuntu xenial-security/universe Translation-en [225 kB]
default: Get:11 http://security.ubuntu.com/ubuntu xenial-security/multiverse amd64 Packages [7,864 B]
default: Get:12 http://security.ubuntu.com/ubuntu xenial-security/multiverse Translation-en [2,672 B]
default: Get:13 http://archive.ubuntu.com/ubuntu xenial/universe Translation-en [4,354 kB]
default: Get:14 http://archive.ubuntu.com/ubuntu xenial/multiverse amd64 Packages [144 kB]
default: Get:15 http://archive.ubuntu.com/ubuntu xenial/multiverse Translation-en [106 kB]
default: Get:16 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages [2,049 kB]
default: Get:17 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages [1,219 kB]
default: Get:18 http://archive.ubuntu.com/ubuntu xenial-updates/universe Translation-en [358 kB]
default: Get:19 http://archive.ubuntu.com/ubuntu xenial-updates/multiverse amd64 Packages [22.6 kB]
default: Get:20 http://archive.ubuntu.com/ubuntu xenial-updates/multiverse Translation-en [8,476 B]
default: Get:21 http://archive.ubuntu.com/ubuntu xenial-backports/main amd64 Packages [9,812 B]
default: Get:22 http://archive.ubuntu.com/ubuntu xenial-backports/main Translation-en [4,456 B]
default: Get:23 http://archive.ubuntu.com/ubuntu xenial-backports/universe amd64 Packages [11.3 kB]
default: Get:24 http://archive.ubuntu.com/ubuntu xenial-backports/universe Translation-en [4,476 B]
default: Fetched 17.3 MB in 7s (2,175 kB/s)
default: Reading package lists...
default: [octool] Installing python3 ....
default: Reading package lists...
default: Building dependency tree...
default: Reading state information...
default: E
default: :
default: Unable to locate package python3.8-dev
default: E
default: :
default: Couldn't find any package by glob 'python3.8-dev'
default: E
default: :
default: Couldn't find any package by regex 'python3.8-dev'
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.
bash-3.2$ vagrant ssh
Welcome to Ubuntu 16.04.7 LTS (GNU/Linux 4.4.0-210-generic x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
UA Infra: Extended Security Maintenance (ESM) is not enabled.
0 updates can be applied immediately.
20 additional security updates can be applied with UA Infra: ESM
Learn more about enabling UA Infra: ESM service for Ubuntu 16.04 at
https://ubuntu.com/16-04
New release '18.04.5 LTS' available.
Run 'do-release-upgrade' to upgrade to it.
vagrant@opencog:~$ pwd
/home/vagrant
vagrant@opencog:~$ ls
opencog
vagrant@opencog:~$ cd opencog
vagrant@opencog:~/opencog$ mkdir build
vagrant@opencog:~/opencog$ cd build
vagrant@opencog:~/opencog/build$ cmake ..
The program 'cmake' is currently not installed. To run 'cmake' please ask your administrator to install the package 'cmake'
Thank you for any time or attention you can point in this direction, to help me get up and going.