Error when installing on Elementary OS 6.1

Hello, I am new to mycroft and I have issues installing on Elementary OS 6.1 on my 2011 macbook air (also new to linux in general). Elementary OS 6.1 is built on Ubuntu LTS 20.04.3

I’ve searched for a thread that expressed similar issues here but it appeared to be a distro-specific issue (Manjaro) for that user and I did not find a solution that worked for me there. I would appreciate any help here. I went with the recommended git installation.

I ran bash dev_setup.sh and my error logs are below; I did not have issues up until this point:

Building wheels for collected packages: PyAudio, psutil, pocketsphinx, fann2
Building wheel for PyAudio (setup.py) … error
ERROR: Command errored out with exit status 1:
command: /home/wineechun/mycroft-core/.venv/bin/python3 -u -c β€˜import sys, setuptools, tokenize; sys.argv[0] = β€˜"’"’/tmp/pip-install-mln_ledf/PyAudio/setup.py’"’"’; file=’"’"’/tmp/pip-install-mln_ledf/PyAudio/setup.py’"’"’;f=getattr(tokenize, β€˜"’"β€˜open’"’"’, open)(file);code=f.read().replace(’"’"’\r\n’"’"’, β€˜"’"’\n’"’"’);f.close();exec(compile(code, file, β€˜"’"β€˜exec’"’"’))’ bdist_wheel -d /tmp/pip-wheel-3w26cd0z
cwd: /tmp/pip-install-mln_ledf/PyAudio/
Complete output (11 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.9
copying src/pyaudio.py β†’ build/lib.linux-x86_64-3.9
running build_ext
creating build/temp.linux-x86_64-3.9
creating build/temp.linux-x86_64-3.9/src
gcc-5 -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -O3 -Wall -fPIC -I/home/wineechun/mycroft-core/.venv/include -I/home/linuxbrew/.linuxbrew/opt/python@3.9/include/python3.9 -c src/_portaudiomodule.c -o build/temp.linux-x86_64-3.9/src/_portaudiomodule.o
error: command β€˜gcc-5’ failed: No such file or directory


ERROR: Failed building wheel for PyAudio
Running setup.py clean for PyAudio
Building wheel for psutil (setup.py) … error
ERROR: Command errored out with exit status 1:
command: /home/wineechun/mycroft-core/.venv/bin/python3 -u -c β€˜import sys, setuptools, tokenize; sys.argv[0] = β€˜"’"’/tmp/pip-install-mln_ledf/psutil/setup.py’"’"’; file=’"’"’/tmp/pip-install-mln_ledf/psutil/setup.py’"’"’;f=getattr(tokenize, β€˜"’"β€˜open’"’"’, open)(file);code=f.read().replace(’"’"’\r\n’"’"’, β€˜"’"’\n’"’"’);f.close();exec(compile(code, file, β€˜"’"β€˜exec’"’"’))’ bdist_wheel -d /tmp/pip-wheel-dxyn70n7
cwd: /tmp/pip-install-mln_ledf/psutil/
Complete output (39 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.9
creating build/lib.linux-x86_64-3.9/psutil
copying psutil/init.py β†’ build/lib.linux-x86_64-3.9/psutil
copying psutil/_psosx.py β†’ build/lib.linux-x86_64-3.9/psutil
copying psutil/_common.py β†’ build/lib.linux-x86_64-3.9/psutil
copying psutil/_pssunos.py β†’ build/lib.linux-x86_64-3.9/psutil
copying psutil/_psaix.py β†’ build/lib.linux-x86_64-3.9/psutil
copying psutil/_pslinux.py β†’ build/lib.linux-x86_64-3.9/psutil
copying psutil/_pswindows.py β†’ build/lib.linux-x86_64-3.9/psutil
copying psutil/_compat.py β†’ build/lib.linux-x86_64-3.9/psutil
copying psutil/_psbsd.py β†’ build/lib.linux-x86_64-3.9/psutil
copying psutil/_psposix.py β†’ build/lib.linux-x86_64-3.9/psutil
creating build/lib.linux-x86_64-3.9/psutil/tests
copying psutil/tests/test_sunos.py β†’ build/lib.linux-x86_64-3.9/psutil/tests
copying psutil/tests/runner.py β†’ build/lib.linux-x86_64-3.9/psutil/tests
copying psutil/tests/test_connections.py β†’ build/lib.linux-x86_64-3.9/psutil/tests
copying psutil/tests/init.py β†’ build/lib.linux-x86_64-3.9/psutil/tests
copying psutil/tests/test_aix.py β†’ build/lib.linux-x86_64-3.9/psutil/tests
copying psutil/tests/test_process.py β†’ build/lib.linux-x86_64-3.9/psutil/tests
copying psutil/tests/test_osx.py β†’ build/lib.linux-x86_64-3.9/psutil/tests
copying psutil/tests/test_system.py β†’ build/lib.linux-x86_64-3.9/psutil/tests
copying psutil/tests/test_bsd.py β†’ build/lib.linux-x86_64-3.9/psutil/tests
copying psutil/tests/test_linux.py β†’ build/lib.linux-x86_64-3.9/psutil/tests
copying psutil/tests/test_misc.py β†’ build/lib.linux-x86_64-3.9/psutil/tests
copying psutil/tests/test_contracts.py β†’ build/lib.linux-x86_64-3.9/psutil/tests
copying psutil/tests/test_posix.py β†’ build/lib.linux-x86_64-3.9/psutil/tests
copying psutil/tests/test_unicode.py β†’ build/lib.linux-x86_64-3.9/psutil/tests
copying psutil/tests/main.py β†’ build/lib.linux-x86_64-3.9/psutil/tests
copying psutil/tests/test_memory_leaks.py β†’ build/lib.linux-x86_64-3.9/psutil/tests
copying psutil/tests/test_windows.py β†’ build/lib.linux-x86_64-3.9/psutil/tests
running build_ext
creating build/temp.linux-x86_64-3.9
creating build/temp.linux-x86_64-3.9/psutil
gcc-5 -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -O3 -Wall -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_VERSION=566 -DPSUTIL_LINUX=1 -I/home/wineechun/mycroft-core/.venv/include -I/home/linuxbrew/.linuxbrew/opt/python@3.9/include/python3.9 -c psutil/_psutil_common.c -o build/temp.linux-x86_64-3.9/psutil/_psutil_common.o
error: command β€˜gcc-5’ failed: No such file or directory


ERROR: Failed building wheel for psutil
Running setup.py clean for psutil
Building wheel for pocketsphinx (setup.py) … error
ERROR: Command errored out with exit status 1:
command: /home/wineechun/mycroft-core/.venv/bin/python3 -u -c β€˜import sys, setuptools, tokenize; sys.argv[0] = β€˜"’"’/tmp/pip-install-mln_ledf/pocketsphinx/setup.py’"’"’; file=’"’"’/tmp/pip-install-mln_ledf/pocketsphinx/setup.py’"’"’;f=getattr(tokenize, β€˜"’"β€˜open’"’"’, open)(file);code=f.read().replace(’"’"’\r\n’"’"’, β€˜"’"’\n’"’"’);f.close();exec(compile(code, file, β€˜"’"β€˜exec’"’"’))’ bdist_wheel -d /tmp/pip-wheel-cjhl19sw
cwd: /tmp/pip-install-mln_ledf/pocketsphinx/
Complete output (26 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.9
creating build/lib.linux-x86_64-3.9/sphinxbase
copying sphinxbase/init.py β†’ build/lib.linux-x86_64-3.9/sphinxbase
copying sphinxbase/sphinxbase.py β†’ build/lib.linux-x86_64-3.9/sphinxbase
creating build/lib.linux-x86_64-3.9/pocketsphinx
copying pocketsphinx/init.py β†’ build/lib.linux-x86_64-3.9/pocketsphinx
copying pocketsphinx/pocketsphinx.py β†’ build/lib.linux-x86_64-3.9/pocketsphinx
running build_ext
swig -python -modern -Ideps/sphinxbase/include -Ideps/sphinxbase/include/sphinxbase -Ideps/sphinxbase/include/android -outdir sphinxbase -o deps/sphinxbase/swig/sphinxbase_wrap.c deps/sphinxbase/swig/sphinxbase.i
Deprecated command line option: -modern. This option is now always on.
creating build/temp.linux-x86_64-3.9
creating build/temp.linux-x86_64-3.9/deps
creating build/temp.linux-x86_64-3.9/deps/sphinxbase
creating build/temp.linux-x86_64-3.9/deps/sphinxbase/src
creating build/temp.linux-x86_64-3.9/deps/sphinxbase/src/libsphinxbase
creating build/temp.linux-x86_64-3.9/deps/sphinxbase/src/libsphinxbase/fe
creating build/temp.linux-x86_64-3.9/deps/sphinxbase/src/libsphinxbase/feat
creating build/temp.linux-x86_64-3.9/deps/sphinxbase/src/libsphinxbase/lm
creating build/temp.linux-x86_64-3.9/deps/sphinxbase/src/libsphinxbase/util
creating build/temp.linux-x86_64-3.9/deps/sphinxbase/swig
gcc-5 -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -O3 -Wall -fPIC -DSPHINXBASE_EXPORTS -DPOCKETSPHINX_EXPORTS -DSPHINX_DLL -DHAVE_CONFIG_H -Ideps/sphinxbase/include -Ideps/sphinxbase/include/sphinxbase -Ideps/sphinxbase/include/android -I/home/wineechun/mycroft-core/.venv/include -I/home/linuxbrew/.linuxbrew/opt/python@3.9/include/python3.9 -c deps/sphinxbase/src/libsphinxbase/fe/fe_interface.c -o build/temp.linux-x86_64-3.9/deps/sphinxbase/src/libsphinxbase/fe/fe_interface.o -Wno-unused-label -Wno-strict-prototypes -Wno-parentheses -Wno-unused-but-set-variable -Wno-unused-variable -Wno-unused-result -Wno-sign-compare
error: command β€˜gcc-5’ failed: No such file or directory


ERROR: Failed building wheel for pocketsphinx
Running setup.py clean for pocketsphinx
Building wheel for fann2 (setup.py) … error
ERROR: Command errored out with exit status 1:
command: /home/wineechun/mycroft-core/.venv/bin/python3 -u -c β€˜import sys, setuptools, tokenize; sys.argv[0] = β€˜"’"’/tmp/pip-install-mln_ledf/fann2/setup.py’"’"’; file=’"’"’/tmp/pip-install-mln_ledf/fann2/setup.py’"’"’;f=getattr(tokenize, β€˜"’"β€˜open’"’"’, open)(file);code=f.read().replace(’"’"’\r\n’"’"’, β€˜"’"’\n’"’"’);f.close();exec(compile(code, file, β€˜"’"β€˜exec’"’"’))’ bdist_wheel -d /tmp/pip-wheel-8oiflkh9
cwd: /tmp/pip-install-mln_ledf/fann2/
Complete output (19 lines):
running swig
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.9
creating build/lib.linux-x86_64-3.9/fann2
copying fann2/init.py β†’ build/lib.linux-x86_64-3.9/fann2
copying fann2/libfann.py β†’ build/lib.linux-x86_64-3.9/fann2
running egg_info
writing manifest file β€˜fann2.egg-info/SOURCES.txt’
copying fann2/fann2.i β†’ build/lib.linux-x86_64-3.9/fann2
copying fann2/fann2_wrap.cxx β†’ build/lib.linux-x86_64-3.9/fann2
copying fann2/fann_cpp_subclass.h β†’ build/lib.linux-x86_64-3.9/fann2
running build_ext
creating build/temp.linux-x86_64-3.9
creating build/temp.linux-x86_64-3.9/fann2
gcc-5 -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -O3 -Wall -fPIC -DSWIG_COMPILE -I./include -I…/include -Iinclude -I/home/wineechun/mycroft-core/.venv/include -I/home/linuxbrew/.linuxbrew/opt/python@3.9/include/python3.9 -c fann2/fann2_wrap.cxx -o build/temp.linux-x86_64-3.9/fann2/fann2_wrap.o
error: command β€˜gcc-5’ failed: No such file or directory


ERROR: Failed building wheel for fann2
Running setup.py clean for fann2
Failed to build PyAudio psutil pocketsphinx fann2
Installing collected packages: PyAudio, pyee, SpeechRecognition, tornado, websocket-client, requests-futures, pyserial, psutil, pocketsphinx, inflection, pillow, python-dateutil, monotonic, fasteners, PyYAML, lingua-franca, lazy, appdirs, pako, smmap, gitdb, GitPython, msm, pycparser, cffi, pynacl, wrapt, deprecated, pyjwt, pygithub, colorama, msk, mycroft-messagebus-client, adapt-parser, padaos, xxhash, fann2, padatious, precise-runner, petact, pyxdg
Running setup.py install for PyAudio … error
ERROR: Command errored out with exit status 1:
command: /home/wineechun/mycroft-core/.venv/bin/python3 -u -c β€˜import sys, setuptools, tokenize; sys.argv[0] = β€˜"’"’/tmp/pip-install-mln_ledf/PyAudio/setup.py’"’"’; file=’"’"’/tmp/pip-install-mln_ledf/PyAudio/setup.py’"’"’;f=getattr(tokenize, β€˜"’"β€˜open’"’"’, open)(file);code=f.read().replace(’"’"’\r\n’"’"’, β€˜"’"’\n’"’"’);f.close();exec(compile(code, file, β€˜"’"β€˜exec’"’"’))’ install --record /tmp/pip-record-dkiqvdzl/install-record.txt --single-version-externally-managed --compile --install-headers /home/wineechun/mycroft-core/.venv/include/site/python3.9/PyAudio
cwd: /tmp/pip-install-mln_ledf/PyAudio/
Complete output (13 lines):
running install
/home/wineechun/mycroft-core/.venv/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.9
copying src/pyaudio.py β†’ build/lib.linux-x86_64-3.9
running build_ext
creating build/temp.linux-x86_64-3.9
creating build/temp.linux-x86_64-3.9/src
gcc-5 -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -O3 -Wall -fPIC -I/home/wineechun/mycroft-core/.venv/include -I/home/linuxbrew/.linuxbrew/opt/python@3.9/include/python3.9 -c src/_portaudiomodule.c -o build/temp.linux-x86_64-3.9/src/_portaudiomodule.o
error: command β€˜gcc-5’ failed: No such file or directory
----------------------------------------
ERROR: Command errored out with exit status 1: /home/wineechun/mycroft-core/.venv/bin/python3 -u -c β€˜import sys, setuptools, tokenize; sys.argv[0] = β€˜"’"’/tmp/pip-install-mln_ledf/PyAudio/setup.py’"’"’; file=’"’"’/tmp/pip-install-mln_ledf/PyAudio/setup.py’"’"’;f=getattr(tokenize, β€˜"’"β€˜open’"’"’, open)(file);code=f.read().replace(’"’"’\r\n’"’"’, β€˜"’"’\n’"’"’);f.close();exec(compile(code, file, β€˜"’"β€˜exec’"’"’))’ install --record /tmp/pip-record-dkiqvdzl/install-record.txt --single-version-externally-managed --compile --install-headers /home/wineechun/mycroft-core/.venv/include/site/python3.9/PyAudio Check the logs for full command output.
WARNING: You are using pip version 20.0.2; however, version 21.3.1 is available.
You should consider upgrading via the β€˜/home/wineechun/mycroft-core/.venv/bin/python3 -m pip install --upgrade pip’ command.
Warning: Failed to install required dependencies. Continue? y/N

Run the following and re-run ./dev-setup.sh

ln -s /bin/gcc /bin/gcc-5
1 Like

Thank you! There was a similar issue with g++ as but these were fixed after running your suggested code to establish the right linkages (to gcc-5 and g+Β±5).

Not sure if it’s right to continue this thread since it is a separate issue from the above, but I’m now facing another set of issues after resolving the issues with dependencies. This is the error log when trying to compile mimic:

/home/linuxbrew/.linuxbrew/bin/ld: ./.libs/libttsmimic.so: undefined reference to snd_pcm_close' /home/linuxbrew/.linuxbrew/bin/ld: ./.libs/libttsmimic.so: undefined reference to snd_pcm_open’
/home/linuxbrew/.linuxbrew/bin/ld: ./.libs/libttsmimic.so: undefined reference to snd_pcm_state' /home/linuxbrew/.linuxbrew/bin/ld: ./.libs/libttsmimic.so: undefined reference to snd_pcm_drain’
/home/linuxbrew/.linuxbrew/bin/ld: ./.libs/libttsmimic.so: undefined reference to snd_pcm_hw_params' /home/linuxbrew/.linuxbrew/bin/ld: ./.libs/libttsmimic.so: undefined reference to snd_pcm_wait’
/home/linuxbrew/.linuxbrew/bin/ld: ./.libs/libttsmimic.so: undefined reference to snd_pcm_hw_params_set_format' /home/linuxbrew/.linuxbrew/bin/ld: ./.libs/libttsmimic.so: undefined reference to snd_pcm_prepare’
/home/linuxbrew/.linuxbrew/bin/ld: ./.libs/libttsmimic.so: undefined reference to snd_pcm_resume' /home/linuxbrew/.linuxbrew/bin/ld: ./.libs/libttsmimic.so: undefined reference to snd_config_update_free_global’
/home/linuxbrew/.linuxbrew/bin/ld: ./.libs/libttsmimic.so: undefined reference to snd_pcm_hw_params_any' /home/linuxbrew/.linuxbrew/bin/ld: ./.libs/libttsmimic.so: undefined reference to snd_strerror’
/home/linuxbrew/.linuxbrew/bin/ld: ./.libs/libttsmimic.so: undefined reference to snd_pcm_delay' /home/linuxbrew/.linuxbrew/bin/ld: ./.libs/libttsmimic.so: undefined reference to snd_pcm_hw_params_set_rate’
/home/linuxbrew/.linuxbrew/bin/ld: ./.libs/libttsmimic.so: undefined reference to snd_pcm_writei' /home/linuxbrew/.linuxbrew/bin/ld: ./.libs/libttsmimic.so: undefined reference to snd_pcm_hw_params_set_access’
/home/linuxbrew/.linuxbrew/bin/ld: ./.libs/libttsmimic.so: undefined reference to snd_pcm_hw_params_set_channels' /home/linuxbrew/.linuxbrew/bin/ld: ./.libs/libttsmimic.so: undefined reference to snd_pcm_drop’
/home/linuxbrew/.linuxbrew/bin/ld: ./.libs/libttsmimic.so: undefined reference to `snd_pcm_hw_params_sizeof’
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:2705: compile_regexes] Error 1
make[1]: *** Waiting for unfinished jobs…
make[1]: Leaving directory β€˜/home/wineechun/mycroft-core/mimic’
make: *** [Makefile:4320: all-recursive] Error 1

Edit: Upon researching the issue further, it appears someone found a similar issue with compiling mimic here. The suggested solution was to skip the mimic build, or to try an unofficial repo with mimic.

Update:

I have fixed all above issues. I installed Mycroft via the Synaptic Package Manager using the unofficial Mycroft Desktop install, and this solved all my problems.

For those that experienced multiple issues with their install, this might be an amenable solution to you. I tried the snap store snap, it didn’t work well. The package manager instead was helpful. I’m not sure why this alternative was not included in the documentation - in any case I hope others find this useful.

Again, thanks @AIIC for the prompt and generous help.