Home Assistant install failing from dietpi-software list

Creating a bug report/issue

I have searched the existing open and closed issues

Required Information

  • DietPi version
    G_DIETPI_VERSION_CORE=9
    G_DIETPI_VERSION_SUB=7
    G_DIETPI_VERSION_RC=1
    G_GITBRANCH=‘master’
    G_GITOWNER=‘MichaIng’

  • Distro version | bookworm 0

  • Kernel version | uname --all

  • Linux DietPi 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/Linux

  • Architecture | dpkg --print-architecture

  • arm64

  • SBC model | echo $G_HW_MODEL_NAME or (EG: RPi3)

  • RPi 3 Model B (aarch64)

  • Power supply used | (5V 1A)

  • SD card used | (SanDisk ultra)

Additional Information (if applicable)

  • Software title | Home Assistant
  • Was the software title installed freshly or updated/migrated?
  • Fresh Install
  • Can this issue be replicated on a fresh installation of DietPi?
  • Don’t know

← If you sent a “dietpi-bugreport”, please paste the ID here →

  • Bug report ID | echo $G_HW_UUID
    0abc8101-fd91-4964-b677-d496f44adb2c

Expected behaviour

Home Assistant should be installed

Actual behaviour

  • [FAILED] DietPi-Software | Installing Python with Home Assistant module into pyenv

Extra details

    • Command: runuser -u homeassistant – dash -c
      . /home/homeassistant/pyenv-activate.sh
      pyenv install 3.12.3
      pyenv local 3.12.3
      pip3 install -U pip setuptools wheel
      [ -z ‘’ ] || pip3 install
      exec pip3 install homeassistant
      [FAILED] DietPi-Software | Unable to continue, DietPi-Software will now terminate.

Installed Python from dietpi-software list. That went well. Tried to install Home Assistant again. Got errors and uploaded with Bug ID - - Reference code: 0abc8101-fd91-4964-b677-d496f44adb2c

See Home Assistant 2024.10 failed after update from 2024.9.3 · Issue #7231 · MichaIng/DietPi · GitHub

But these seems to be post install issues. homeassistant user and virtual environment is already created here.
Do I have to manually create these before I use suggested command line option in earlier post?
Install uv first? create virtual env? Where do I edit install scripts?

There should be no need to install any of the components you posted above manually.

Selecting HA from DietPi software will create the respected pyenv for HA already.

If there is an issue during the installation process, you would need to share the full install log

I did use the home assistant option from dietpi software list and tried to install. Got issues, uploaded the error log and used the bug guid in my first post. I will try again, if you prefer to see most recent issues.

The error log is not visible for everyone and automatically deleted after a couple of days. Therefore it would be helpful sot share the whole install log with us :slight_smile:

Try hassle free home assistant from here. It is using well tested official Docker instance. I am using it for about a year, no upgrade caused any problems.

Here is the fresh error log from home assistant install attempt.

Details:

  • Date | 2024-10-08 21:25:00
  • Program name | DietPi-Software
  • Command | runuser -u homeassistant -- dash -c . /home/homeassistant/pyenv-activate.sh pyenv install 3.12.3 pyenv local 3.12.3 pip3 install -U pip setuptools wheel [ -z '' ] || pip3 install exec pip3 install homeassistant
  • Exit code | 127
  • DietPi version | v9.7.1 (MichaIng/master)
  • Distro version | bookworm (ID=7,RASPBIAN=0)
  • Kernel version | Linux DietPi 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/Linux
  • Architecture | arm64
  • Hardware model | RPi 3 Model B (aarch64) (ID=3)
  • Power supply | (EG: RAVPower 5V 1A)
  • SD card | (EG: SanDisk Ultra 16 GB)

Steps to reproduce:

Expected behaviour:

Actual behaviour:

Extra details:

Additional logs:

Downloading Python-3.12.3.tar.xz...
-> https://www.python.org/ftp/python/3.12.3/Python-3.12.3.tar.xz
Installing Python-3.12.3...

BUILD FAILED (Debian GNU/Linux 12 using python-build 20180424)

Inspect or clean up the working tree at /tmp/python-build.20241008212340.3100
Results logged to /tmp/python-build.20241008212340.3100.log

Last 10 log lines:
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for --enable-universalsdk... no
checking for --with-universal-archs... no
checking MACHDEP... "linux"
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/tmp/python-build.20241008212340.3100/Python-3.12.3':
configure: error: C compiler cannot create executables
See `config.log' for more details
pyenv: version `3.12.3' not installed
dash: 5: pip3: not found
dash: 7: exec: pip3: not found

hmm I did a test this morning on RPI4 and everything seems to be working as exspected

[ INFO ] DietPi-Software | Installing Python with Home Assistant module into pyenv, please wait...
Downloading Python-3.12.3.tar.gz...
-> https://www.python.org/ftp/python/3.12.3/Python-3.12.3.tgz
Installing Python-3.12.3...
Installed Python-3.12.3 to /home/homeassistant/.pyenv/versions/3.12.3
Requirement already satisfied: pip in ./.pyenv/versions/3.12.3/lib/python3.12/site-packages (24.0)
Collecting pip
  Downloading pip-24.2-py3-none-any.whl.metadata (3.6 kB)
Collecting setuptools
  Downloading setuptools-75.1.0-py3-none-any.whl.metadata (6.9 kB)
Collecting wheel
  Downloading wheel-0.44.0-py3-none-any.whl.metadata (2.3 kB)
Downloading pip-24.2-py3-none-any.whl (1.8 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.8/1.8 MB 6.6 MB/s eta 0:00:00
Downloading setuptools-75.1.0-py3-none-any.whl (1.2 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.2/1.2 MB 8.3 MB/s eta 0:00:00
Downloading wheel-0.44.0-py3-none-any.whl (67 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 67.1/67.1 kB 15.0 MB/s eta 0:00:00
Installing collected packages: wheel, setuptools, pip
  Attempting uninstall: pip
    Found existing installation: pip 24.0
    Uninstalling pip-24.0:
      Successfully uninstalled pip-24.0
Successfully installed pip-24.2 setuptools-75.1.0 wheel-0.44.0
Collecting homeassistant

No issues to setup HA own pyenv :thinking:

Did you tried to check both log files as stated? Would be good to know why executables can’t be created. Maybe there are other log files within /tmp right after the issue happen to you?

Maybe your system is running out of memory or available file system space?

I guess reboot cleaned out the log files. I will try to install HA again.
As for the space,

root@DietPi:~# df -h
Filesystem             Size  Used Avail Use% Mounted on
/dev/root               29G  3.2G   25G  12% /
devtmpfs               446M     0  446M   0% /dev
tmpfs                  480M     0  480M   0% /dev/shm
tmpfs                  192M  3.9M  189M   3% /run
tmpfs                  5.0M     0  5.0M   0% /run/lock
tmpfs                  1.0G     0  1.0G   0% /tmp
tmpfs                   50M  416K   50M   1% /var/log
/dev/mmcblk0p1         127M   33M   95M  26% /boot
10.0.0.106:/mnt/HD_a2  1.8T  1.6T  242G  87% /mnt/NAS
root@DietPi:~#

And htop

I will update you with additional log files soon. Where can in find config.log file for C compiler?

honestly I’m not sure, at least I was not able to find that file during my test.

Here is the content from python log file

root@DietPi:~# cat  /tmp/python-build.20241009200058.27975.log
/tmp/python-build.20241009200058.27975 ~
/tmp/python-build.20241009200058.27975/Python-3.12.3 /tmp/python-build.20241009200058.27975 ~
checking build system type... aarch64-unknown-linux-gnu
checking host system type... aarch64-unknown-linux-gnu
checking for Python interpreter freezing... ./_bootstrap_python
checking for python3.12... no
checking for python3.12... no
checking for python3.11... python3.11
checking Python for regen version... Python 3.11.2
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for --enable-universalsdk... no
checking for --with-universal-archs... no
checking MACHDEP... "linux"
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/tmp/python-build.20241009200058.27975/Python-3.12.3':
configure: error: C compiler cannot create executables
See `config.log' for more details
root@DietPi:~#

Attaching config.log file to post
config.log (18.9 KB)

If it helps, I am attaching screenshot from tmp folder

Following I found within the log

cc1: internal compiler error: Segmentation fault

Usually this happen on file system corruption and/or on wrong system architecture used.

Is this an empty system? Would it be an option to start with a new fresh image?

Not sure what you mean by empty system. I have been using this image for sometime and very much invested in the current state (RTL433, Syncthing, VPN…) I do have HA running on different RPI but unfortunately not able to update it to most recent version. So I used this PI’s image (16gb) restored it to 32gb card, updated dietpi with most recent version and tried HA install. So it’s definitely not empty, has running few of my apps. Doing fresh install will not help me at this point. May be I will try docker route and see it that works or not. :man_facepalming:

Hi @Joulinar, I was able to get docker + home assistant working finally. Thanks for your support. We can close this issue now.

Out of interest, does gcc work at all?

gcc --version
root@DietPi:~# gcc --version
gcc (Debian 12.2.0-14) 12.2.0
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Ah, it was cc1 which had the segmentation faul, not gcc. That one is not made to be called manually, but it can be. Does the following throw a segmentation fault as well, or does it just not give any output (expected)?

/usr/lib/gcc/*/12/cc1 --version

I am just running the commands you are asking…:slight_smile:

root@DietPi:~# /usr/lib/gcc/*/12/cc1 --version
cc1: internal compiler error: Segmentation fault
0x1745fa7 internal_error(char const*, ...)
        ???:0
0xb169cc make_pass_profile(gcc::context*)
        ???:0
0xaf755b gcc::pass_manager::pass_manager(gcc::context*)
        ???:0
Please submit a full bug report, with preprocessed source (by using -freport-bug).
Please include the complete backtrace with any bug report.
See <file:///usr/share/doc/gcc-12/README.Bugs> for instructions.
root@DietPi:~#