V5.0 Debian install error

284 views
Skip to first unread message

Iver Johnson

unread,
Jan 16, 2024, 8:28:02 AM1/16/24
to weewx-user
Attempting to follow the new install guide for Debian.

After sudo apt install weewx I receive this (errors highlighted):

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  python3-cheetah python3-configobj python3-usb
Suggested packages:
  python-cheetah-doc python3-memcache python-configobj-doc sqlite ftp
The following NEW packages will be installed:
  python3-cheetah python3-configobj python3-usb weewx
0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
Need to get 1,773 kB of archives.
After this operation, 6,899 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:3 https://weewx.com/apt/python3 buster/main all weewx all 5.0.0-1 [1,556 kB]
Get:2 http://raspbian.raspberrypi.org/raspbian bullseye/main armhf python3-cheetah armhf 3.2.6-1+b1 [142 kB]
Get:1 https://mirrors.gigenet.com/raspbian/raspbian bullseye/main armhf python3-configobj all 5.0.6-4 [35.8 kB]
Get:4 https://mirrors.gigenet.com/raspbian/raspbian bullseye/main armhf python3-usb all 1.0.2-2 [38.9 kB]
Fetched 1,773 kB in 2s (823 kB/s)
Preconfiguring packages ...
Selecting previously unselected package python3-configobj.
(Reading database ... 146632 files and directories currently installed.)
Preparing to unpack .../python3-configobj_5.0.6-4_all.deb ...
Unpacking python3-configobj (5.0.6-4) ...
Selecting previously unselected package python3-cheetah.
Preparing to unpack .../python3-cheetah_3.2.6-1+b1_armhf.deb ...
Unpacking python3-cheetah (3.2.6-1+b1) ...
Selecting previously unselected package python3-usb.
Preparing to unpack .../python3-usb_1.0.2-2_all.deb ...
Unpacking python3-usb (1.0.2-2) ...
Selecting previously unselected package weewx.
Preparing to unpack .../archives/weewx_5.0.0-1_all.deb ...
Unpacking weewx (5.0.0-1) ...
Setting up python3-usb (1.0.2-2) ...
Setting up python3-cheetah (3.2.6-1+b1) ...
Setting up python3-configobj (5.0.6-4) ...
Setting up weewx (5.0.0-1) ...
Using root:root as user:group
Creating /etc/default/weewx
Using configuration file /etc/weewx/weewx.conf
Processing configuration file /etc/weewx/weewx.conf
Traceback (most recent call last):
  File "/usr/share/weewx/weectl.py", line 74, in <module>
    main()
  File "/usr/share/weewx/weectl.py", line 66, in main
    namespace.func(namespace)
  File "/usr/share/weewx/weectllib/__init__.py", line 121, in dispatch
    namespace.action_func(config_dict, namespace)
  File "/usr/share/weewx/weectllib/station_cmd.py", line 317, in reconfigure_station
    weectllib.station_actions.station_reconfigure(config_dict=config_dict,
  File "/usr/share/weewx/weectllib/station_actions.py", line 164, in station_reconfigure
    config_config(config_dict,
  File "/usr/share/weewx/weectllib/station_actions.py", line 204, in config_config
    config_altitude(config_dict, altitude=altitude, no_prompt=no_prompt)
  File "/usr/share/weewx/weectllib/station_actions.py", line 254, in config_altitude
    raise ValueError(f"Unknown altitude unit {unit}")
ValueError: Unknown altitude unit feet

dpkg: error processing package weewx (--configure):
 installed weewx package post-installation script subprocess returned error exit status 1
Processing triggers for man-db (2.9.4-2) ...
Errors were encountered while processing:
 weewx
E: Sub-process /usr/bin/dpkg returned an error code (1)

There is no html/weewx folder, no systemd file installed and it doesn't ask me for station config details during the install. 

If I try apt purge weewx or apt remove weewx:

Removing weewx (5.0.0-1) ...
Stopping weewxd using systemd
find: ‘/etc/weewx/bin’: No such file or directory
dpkg: error processing package weewx (--remove):
 installed weewx package pre-removal script subprocess returned error exit status 1
dpkg: too many errors, stopping
Errors were encountered while processing:
 weewx
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)

Any ideas from the experts?

Tom Keffer

unread,
Jan 16, 2024, 8:33:22 AM1/16/24
to weewx...@googlegroups.com
It looks like when the installer asked your altitude, you specified unit "feet' instead of "foot'.

Either go into /etc/weewx/weewx.conf and change it, then try installing again, or remove /etc/weewx/weewx.conf and start all over again, this time remembering to use "foot".

-tk



--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/0ef1eb46-d943-4fe4-95a8-2b56e93178ean%40googlegroups.com.

matthew wall

unread,
Jan 16, 2024, 8:34:01 AM1/16/24
to weewx-user
On Tuesday, January 16, 2024 at 8:28:02 AM UTC-5 iverj...@gmail.com wrote:

  File "/usr/share/weewx/weectllib/station_actions.py", line 254, in config_altitude
    raise ValueError(f"Unknown altitude unit {unit}")
ValueError: Unknown altitude unit feet


in your weewx config file (probably /etc/weewx/weewx.conf), change 'feet' to 'foot'

then `sudo apt install weewx` again
 

Iver Johnson

unread,
Jan 16, 2024, 8:43:43 AM1/16/24
to weewx-user
Opened weewx.conf in nano and made sure it said 10, foot.  Saved again.

Tried sudo apt install weewx again and received the same errors.  Is it possible it is saving the originally entered responses somewhere? It doesn't even ask the config questions now.

matthew wall

unread,
Jan 16, 2024, 9:06:24 AM1/16/24
to weewx-user
you can purge the debconf values like this:

echo PURGE | sudo debconf-communicate weewx


Iver Johnson

unread,
Jan 16, 2024, 9:16:49 AM1/16/24
to weewx-user
That was it!  You are awesome!   Thank you!
Reply all
Reply to author
Forward
0 new messages