Mycroft Community Forum

Snap Install Failed

Hi all,

I tried installing the snap beta (Ubuntu 20.10 64 bit) and it seems to have failed.

when run the first time, it looks like it was updating python (PIP?) and then stopped somewhere.

when I try to run mycroft from the desktop, nothing.
From the terminal I get:

/snap/mycroft/1078/bin/mycroft-launch: line 92: mycroft-cli-client: command not found
Stopping all processes...
mycroft-skills: no process found
mycroft-enclosure-client: no process found
mycroft-speech-client: no process found
mycroft-audio: no process found
Stopped

logs that I found:
==> snap/mycroft/common/logs/audio.log <==
/snap/mycroft/1078/bin/snapcraft-preload: 6: exec: mycroft-audio: not found

==> snap/mycroft/common/logs/bus.log <==
/snap/mycroft/1078/bin/snapcraft-preload: 6: exec: mycroft-messagebus: not found

==> snap/mycroft/common/logs/enclosure.log <==
/snap/mycroft/1078/bin/snapcraft-preload: 6: exec: mycroft-enclosure-client: not found

==> snap/mycroft/common/logs/skills.log <==
/snap/mycroft/1078/bin/snapcraft-preload: 6: exec: mycroft-skills: not found

==> snap/mycroft/common/logs/voice.log <==
/snap/mycroft/1078/bin/snapcraft-preload: 6: exec: mycroft-speech-client: not found

So it looks like the installation is broken, (why I don’t know) but short of uninstalling and re-installing (I’m away and only have 2Mbps broadband here so it’s v slow, maybe problems with that broke the install…) there seems to be no repair option.

I had previously successfully installed via git, (but only on its own partition, in Xubuntu, because of a clash with libjack-jackd2-0 which it wants to uninstall, which would break blender, gnome and several other things I use. This is a separate issue - why does it need a library that clashes with something used by so many commonly used things?)

Many thanks in advance for any suggestions

Don’t use the snap, it’s not an officially built/supported version.
There’s other posts about jack you can search for, not sure if anyone ever got it working in combination.

I know it’s alpha, but it’s listed as being actively developed, by mycroft.ai.
Failing to install is not listed among the known bugs.

It’s possible that although it’s a snap, it may have got mixed up with my half-done git install?

Thanks anyway.

I would avoid the snap like the plague either way.

Not sure about it colluding with the git install, seems unlikely they’d directly conflict.

Well the snap is my only option this week.
Removed and and re-installing. Much quicker, the downloads must have been cached by snap-store.

Running mycroft from desktop, and currently in the git clone stage of setting up.

(Helps that teenage son is still asleep so I have the in-laws’ wet-string broadband all to myself)

Will post how it goes.

Edit WiFi had crashed. rebooted box and Mycroft continues setting up :slight_smile:

I agree with @baconator, the snap should be avoid so far. :frowning:

2 Likes

So[quote=“goldyfruit, post:6, topic:9980, full:true”]
I agree with @baconator, the snap should be avoid so far. :frowning:
[/quote]

So mycroft is only for dedicated installations (including VMs and docker instances)?

Have to admit, it’s having trouble installing skills because it’s trying to use sudo (which is possibly not needed in a snap instance)

When you use the dev_setup.sh script, it will create a Python virtualenv which will hold all the Python requirements of Mycroft.

I tried to use the Docker image once but I had so much trouble that I gave up (I’m working on a different Docker images approach).

it will also want to uninstall libjack-jackd2-0, and as a result many things I use that rely on it.

It’s a shame that this week while I have time (but not broadband bandwidth) I can’t just install mycroft in a standard current Ubuntu desktop and play with it. But I appreciate that everyone’s time is finite, and the focus might be on the Mark II, and generally embedded environments at the moment, where conflicts are easier to manage/avoid.

You are right.

There is a “hacky” way if you are willing to try, it’s to recreate the libjack-jackd2-0 package without the conflict control for libjack0 package.

# Download package from the Ubuntu mirror
$ apt download libjack-jackd2-0

# Decompress the package
$ dpkg-deb -R libjack-jackd2-*.deb pkg_dir

# Replace the Version with a custom one and remove libjack0 from the Conflicts
$ sed -i -e '/^Version:/s/~.*$/~mycroft-hack/' -e '/, libjack0$/d' pkg_dir/DEBIAN/control

# Build the new libjack-jackd2 without libjack0 as conflict package
$ dpkg-deb -b pkg_dir/ libjack-jackd2_mycroft-hack.deb

# Install the new `libjack-jackd2` over the current one installed on your system
$ sudo dpkg -i libjack-jackd2_mycroft-hack.deb

# Check if the package has been replaced with the custom one
$ dpkg -l | grep mycroft-hack
ii  libjack-jackd2-0:arm64            1.9.12~mycroft-hack                 arm64        JACK Audio Connection Kit (libraries)

The sed worked for me because with the current version of the package in Debian Buster for ARM64, it could be different for you. If it doesn’t work, just use your preferred text editor to apply the changes.

Keep in mind that this is a way to trick Apt but this will possible prevent some packages to be updated. If you need to rollback please follow these steps:

$ apt-cache policy libjack-jackd2-0
libjack-jackd2-0:
  Installed: 1.9.12~mycroft-hack
  Candidate: 1.9.12~mycroft-hack
  Version table:
 *** 1.9.12~mycroft-hack 100
        100 /var/lib/dpkg/status
     1.9.12~dfsg-2 500
        500 http://deb.debian.org/debian buster/main arm64 Packages
$ sudo apt-get install libjack-jackd2-0=1.9.12~dfsg-2
1 Like

Cheers!
The sed line only removed the Conflicts, so I manually edited the version.

Version: 1.9.14-0ubuntu3.1~mycroft-hack

I got to this point:

$ sudo dpkg -i libjack-jackd2_mycroft-hack.deb
dpkg: error processing archive libjack-jackd2_mycroft-hack.deb (--install):
 unable to open file '/var/lib/dpkg/tmp.ci//.#control': No such file or directory
Errors were encountered while processing:
 libjack-jackd2_mycroft-hack.deb

EDIT
fixed version

Version: 1.9.14~mycroft-hack

And it worked.

$ dpkg -l | grep mycroft-hack
ii libjack-jackd2-0:amd64 1.9.14~mycroft-hack amd64 JACK Audio Connection Kit (libraries)

hmmm dev-setup.sh still wants to remove libjack-jackd2-0…

1 Like
$    ./dev_setup.sh 
Installing packages...
 Installing packages for Debian/Ubuntu/Mint...

We have detected that your computer has the libjack-jackd2-0 package installed.
Mycroft requires a conflicting package, and will likely uninstall this package.
On some systems, this can cause other programs to be marked for removal.
Please review the following package changes carefully.
Press enter to continue
Reading package lists... Done
Building dependency tree       
Reading state information... Done
build-essential is already the newest version (12.8ubuntu3).
git is already the newest version (1:2.27.0-1ubuntu1).
pkg-config is already the newest version (0.29.2-1ubuntu1).
python3 is already the newest version (3.8.6-0ubuntu1).
python3-setuptools is already the newest version (49.3.1-2).
curl is already the newest version (7.68.0-1ubuntu4.2).
pulseaudio is already the newest version (1:13.99.2-1ubuntu2.1).
pulseaudio-utils is already the newest version (1:13.99.2-1ubuntu2.1).
The following package was automatically installed and is no longer required:
  gir1.2-appindicator3-0.1
Use 'sudo apt autoremove' to remove it.
The following additional packages will be installed:
  autotools-dev icu-devtools libasound2-dev libblkid-dev libexpat1-dev libfann2 libglib2.0-dev-bin libjack-dev libjack0
  libjpeg-turbo8-dev libjpeg8-dev libjq1 libltdl-dev libmount-dev libonig5 libout123-0 libpcre16-3 libpcre2-dev
  libpcre2-posix2 libpcre3-dev libpcre32-3 libpcrecpp0v5 libportaudio2 libportaudiocpp0 libpython3-dev libpython3.8-dev
  libselinux1-dev libsepol1-dev libsyn123-0 m4 python3.8-dev swig4.0 uuid-dev zlib1g-dev
Suggested packages:
  autoconf-archive gnu-standards autoconf-doc bison-doc libasound2-doc libfann-doc libgirepository1.0-dev libglib2.0-doc
  icu-doc jackd1 libtool-doc libssl-doc gfortran | fortran95-compiler gcj-jdk m4-doc jackd nas oss-compat oss4-base
  portaudio19-doc byobu | screenie | iselect ncurses-term swig-doc swig-examples swig4.0-examples swig4.0-doc
The following packages will be REMOVED:
  libjack-jackd2-0
The following NEW packages will be installed:
  autoconf automake autotools-dev bison flac icu-devtools jq libasound2-dev libblkid-dev libexpat1-dev libfann-dev libfann2
  libffi-dev libglib2.0-dev libglib2.0-dev-bin libicu-dev libjack-dev libjack0 libjpeg-dev libjpeg-turbo8-dev libjpeg8-dev
  libjq1 libltdl-dev libmount-dev libonig5 libout123-0 libpcre16-3 libpcre2-dev libpcre2-posix2 libpcre3-dev libpcre32-3
  libpcrecpp0v5 libportaudio2 libportaudiocpp0 libpython3-dev libpython3.8-dev libselinux1-dev libsepol1-dev libssl-dev
  libsyn123-0 libtool m4 mpg123 portaudio19-dev python3-dev python3.8-dev screen swig swig4.0 uuid-dev zlib1g-dev
0 upgraded, 51 newly installed, 1 to remove and 0 not upgraded.
Need to get 25.4 MB of archives.
After this operation, 120 MB of additional disk space will be used.
Do you want to continue? [Y/n] n
Abort.

Please use the image button when you paste code, it simpler to read :stuck_out_tongue:

Could you please paste the content of control file?

Oops, thought I had (edited to fix)

Control:

Package: libjack-jackd2-0
Source: jackd2
Version: 1.9.14~mycroft-hack
Architecture: amd64
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Installed-Size: 1148
Depends: libc6 (>= 2.32), libdb5.3, libgcc-s1 (>= 3.0), libsamplerate0 (>= 0.1.7), libstdc++6 (>= 5.2)
Suggests: jackd2 (= 1.9.14-0ubuntu3.1)
Replaces: jackd2 (<< 1.9.10+20150825git1ed50c92~dfsg-5), libjack-0.116, libjack-0.125
Provides: libjack-0.116, libjack-0.125
Section: libs
Priority: optional
Multi-Arch: same
Homepage: https://jackaudio.org/
Description: JACK Audio Connection Kit (libraries)
 JACK is a low-latency sound server, allowing multiple applications to
 connect to one audio device, and to share audio between themselves.
 .
 This package contains the shared libraries.
Original-Maintainer: Debian Multimedia Maintainers <debian-multimedia@lists.debian.org>

Now software updater wants to update JACK! :smiley:

No worries

Ok, I get the same behavior that yours, it seems that there is an other package conflicting with libjack-jackd2-0.

Let me check…

I think portaudio19-dev needs libjack-dev, which depends on libjack0

Yeah, I guess we will have to be dirtier with the control file.

Package: libjack-jackd2-0
Source: jackd2
Version: 1.9.14~mycroft-hack
Architecture: amd64
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Installed-Size: 1148
Depends: libc6 (>= 2.32), libdb5.3, libgcc-s1 (>= 3.0), libsamplerate0 (>= 0.1.7), libstdc++6 (>= 5.2)
Suggests: jackd2 (= 1.9.14-0ubuntu3.1)
Replaces: jackd2 (<< 1.9.10+20150825git1ed50c92~dfsg-5)
Section: libs
Priority: optional
Multi-Arch: same
Homepage: https://jackaudio.org/
Description: JACK Audio Connection Kit (libraries)
 JACK is a low-latency sound server, allowing multiple applications to
 connect to one audio device, and to share audio between themselves.
 .
 This package contains the shared libraries.
Original-Maintainer: Debian Multimedia Maintainers <debian-multimedia@lists.debian.org>

Rebuild the package from the previous steps.

Then you will have to --force-overwrite the installation of libjack0 because both of the packages own libjack.so.0 and libjackserver.so.0.

$ sudo apt-get -o Dpkg::Options::="--force-overwrite" install libjack0

I don’t know how this will impact your Ubuntu Desktop, it’s your decision. :slight_smile:

Still reversible with the earlier command, above?

Yes, I just reverted it on my Debian Buster ARM64 (Raspberry Pi OS).

$ sudo apt-get -o Dpkg::Options::="--force-overwrite" install libjack-jackd2-0=1.9.12~dfsg-2
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libasound2-dev libaudio2 libmpg123-0 libopenal-data libopenal1 libout123-0 libportaudio2 libportaudiocpp0 libsndio7.0 libxt6
Use 'sudo apt autoremove' to remove them.
Suggested packages:
  jackd2
The following packages will be REMOVED:
  libjack-dev libjack0 portaudio19-dev
The following packages will be DOWNGRADED:
  libjack-jackd2-0
0 upgraded, 0 newly installed, 1 downgraded, 3 to remove and 0 not upgraded.
Need to get 0 B/286 kB of archives.
After this operation, 3,142 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 49342 files and directories currently installed.)
Removing portaudio19-dev:arm64 (19.6.0-1) ...
Removing libjack-dev (1:0.125.0-3) ...
Removing libjack0:arm64 (1:0.125.0-3) ...
dpkg: warning: downgrading libjack-jackd2-0:arm64 from 1.9.12~mycroft to 1.9.12~dfsg-2
(Reading database ... 49179 files and directories currently installed.)
Preparing to unpack .../libjack-jackd2-0_1.9.12~dfsg-2_arm64.deb ...
Unpacking libjack-jackd2-0:arm64 (1.9.12~dfsg-2) over (1.9.12~mycroft) ...
Setting up libjack-jackd2-0:arm64 (1.9.12~dfsg-2) ...
Processing triggers for libc-bin (2.28-10) ...
1 Like

What the hell, let’s do it :smiley:

Thanks so much for your time, dev_setup.sh is running now. Will let you know

2 Likes