Mycroft-core: dev_setup.sh fails on Linux Mint

Created on 14 Jul 2019  ·  6Comments  ·  Source: MycroftAI/mycroft-core

Be clear about the software, hardware and version you are running

  • git clone mycroft-core
  • Linux Mint Sylvia 18
$ cat /etc/os-release
NAME="Linux Mint"
VERSION="18.3 (Sylvia)"
ID=linuxmint
ID_LIKE=ubuntu
PRETTY_NAME="Linux Mint 18.3"
VERSION_ID="18.3"
HOME_URL="http://www.linuxmint.com/"
SUPPORT_URL="http://forums.linuxmint.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/linuxmint/"
VERSION_CODENAME=sylvia
UBUNTU_CODENAME=xenial

Docs specifically state that mint should be supported
https://mycroft.ai/documentation/linux/#mycroft-for-linux

Try to provide steps that we can use to replicate the Issue

Running dev_setup.sh initially, and went through the wizard, eventually it started installation, but I did not notice this wee message (it did not prompt):

Could not find package manager
Make sure to manually install: git python3 python-setuptools python-venv pygobject libtool libffi libjpg openssl autoconf bison swig glib2.0 portaudio19 mpg123 flac curl fann g++ jq

Be as specific as possible about the expected condition, and the deviation from expected condition.

In this function:

function install_deps() {
    echo 'Installing packages...'
...
    elif os_is_like debian || os_is debian ; then
        # Debian / Ubuntu
        echo "$GREEN Installing packages for Debian/Ubuntu...$RESET"
        $SUDO apt-get install -y (snip)...
...

Presumably for Mint we should expect a close-(is-like) match to ubuntu/debian, but it only checks for ==debian and ~debian, but not ~ubuntu or ==ubuntu.

function os_is_like() {
    [[ $(grep "^ID_LIKE=" /etc/os-release | awk -F'=' '/^ID_LIKE/ {print $2}' | sed 's/\"//g') == $1 ]]
}

Provide log files or other output to help us see the error

There are various problems during venv pip package installation since the dependencies aren't installed.

Upload any files to the Issue that will be useful in helping us to investigate

N/A

Most helpful comment

Ah ok, I'll remove my PR and await yours.

All 6 comments

Thanks for reporting, thanks for providing the os_release file. I'll push an update to use is_like ubuntu as well.

I'll push a PR right now with your suggested fix.

@forslund I actually have a PR incoming (sorry for the delay, having issues with system git push user stuck to work account)

```
diff --git a/dev_setup.sh b/dev_setup.sh
index 306e38c..97a72d2 100755
--- a/dev_setup.sh
+++ b/dev_setup.sh
@@ -293,9 +293,9 @@ function install_deps() {
$SUDO yum install -y epel-release-latest-7.noarch.rpm
rm epel-release-latest-7.noarch.rpm
redhat_common_install

  • elif os_is_like debian || os_is debian ; then
  • # Debian / Ubuntu
  • echo "$GREEN Installing packages for Debian/Ubuntu...$RESET"
  • elif os_is_like debian || os_is debian || os_is_like ubuntu || os_is ubuntu || os_is linuxmint; then
  • # Debian / Ubuntu / Mint
  • echo "$GREEN Installing packages for Debian/Ubuntu/Mint...$RESET"
    $SUDO apt-get install -y git python3 python3-dev python3-setuptools libtool libffi-dev libssl-dev autoconf automake bison swig libglib2.0-dev portaudio19-dev mpg123 screen flac curl libicu-dev pkg-config libjpeg-dev libfann-dev build-essential jq
    elif os_is_like fedora ; then
    echo "$GREEN Installing packages for Fedora...$RESET"
    @@ -316,6 +316,13 @@ function install_deps() {
    echo
    echo -e "${YELLOW}Could not find package manager
    ${YELLOW}Make sure to manually install:$BLUE git python3 python-setuptools python-venv pygobject libtool libffi libjpg openssl autoconf bison swig glib2.0 portaudio19 mpg123 flac curl fann g++ jq\n$RESET"
    +
  • echo 'Warning: Failed to install all dependencies. Continue? y/N'
  • read -n1 continue
  • if [[ $continue != 'y' ]] ; then
  • exit 1
  • fi
    +
    fi
    }
    ```

Ah ok, I'll remove my PR and await yours.

and how to install it now on mint? and what does "PR" mean?? pls help.. what i have to do??

Hi Z3r0ut,

PR stands for Pull Request. It is a bundle of code that is being suggested for inclusion into a project.

It's likely that this change contributed by fermulator will get included into mycroft-core shortly, as soon as forslund has had a chance to review it. When that happens this ticket will get marked as closed and you should then be able to install Mycroft using the normal instructions provided in the documentation.

If you are confident using Linux and scripting in bash, you can choose to review the changes and apply them to your own local copy of Mycroft, however I'd recommend waiting for them to be formally accepted if you are unsure.

Was this page helpful?
0 / 5 - 0 ratings