Error installing 5.1

147 views
Skip to first unread message

Roland Mayne

unread,
Nov 4, 2024, 12:29:31 PM11/4/24
to weewx-user
I get this error "sed: can't read /etc/weewx/udev/weewx.rules: No such file or directory" during installation. 
This file realy don't exist.

Tom Keffer

unread,
Nov 4, 2024, 12:40:05 PM11/4/24
to weewx...@googlegroups.com
Geez, how about a little more information?

- Which operating system are you using?
- Was this a new install, or an upgrade?
- How about the context of the error? What did it say before and after? In fact, give the complete transcript, including what you typed.
- Any other useful information that you can think of.



On Mon, Nov 4, 2024 at 9:29 AM Roland Mayne <roland...@gmail.com> wrote:
I get this error "sed: can't read /etc/weewx/udev/weewx.rules: No such file or directory" during installation. 
This file realy don't exist.

--
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 visit https://groups.google.com/d/msgid/weewx-user/2d3a5fc3-40b8-4994-8f04-5b0989b22327n%40googlegroups.com.

Ted Lavino

unread,
Oct 2, 2025, 8:42:17 AMOct 2
to weewx-user
Folks, getting this error as well on a Rasberry Pi 3B running Raspian Bookworm (with current updates) after removing (via "sudo apt remove weewx", plus manually deleting /etc/weewx) and reinstalling via "sudo apt install weewx".  Confirmed /etc/weewx/udev exists but is empty:

Installing udev rules

sed: can't read /etc/weewx/udev/weewx.rules: No such file or directory
dpkg: error processing package weewx (--configure):
 installed weewx package post-installation script subprocess returned error exit
 status 2
Processing triggers for man-db (2.11.2-2) ...
Errors were encountered while processing:
 weewx
E: Sub-process /usr/bin/dpkg returned an error code (1)

Any thoughts would be appreciated.

matthew wall

unread,
Oct 2, 2025, 10:21:22 AM (14 days ago) Oct 2
to weewx...@googlegroups.com
there must have been some failure earlier in the installation process resulting in no udev rules file (weewx.rules) copied into the directory /etc/weewx/udev

my first guess is that you tried to install over an existing /etc/weewx directory, and a permissions/ownership problem prevent the copy. however, you indicated that you deleted /etc/weewx

were there any other warnings in the installer output? could you post all of the installer output from when you invoked 'sudo apt install weewx'?

is there anything else in the /etc/weewx directory after the failed installation? could you do 'ls -lR /etc/weewx' and post the result?

Ted Lavino

unread,
Oct 2, 2025, 2:39:41 PM (14 days ago) Oct 2
to weewx-user
Hello Mathew, your assistance is much appreciated.

I removed weewx following the process I described above using "sudo apt remove weewx" plus "sudo rm -r /etc/weewx" as the apt remove weewx process did not remove all files, and then reinstalled weewx via "sudo apt install weewx"

Cheers,

TL

Removal:

ted@weewx:~ $ sudo apt remove weewx
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
  python3-cheetah python3-configobj python3-ephem python3-usb
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  weewx
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 5,754 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 167316 files and directories currently installed.)
Removing weewx (5.1.0-4) ...
Stopping weewxd using systemd
Removing systemd units
weewx.service is not a native service, redirecting to systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install disable weewx
update-rc.d: error: weewx Default-Start contains no runlevels, aborting.
Removing udev rules

ted@weewx:~ $ sudo rm -r /etc/weewx

Subsequent install:

ted@weewx:~ $ sudo apt install weewx
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Suggested packages:
  sqlite ftp httpd
The following NEW packages will be installed:
  weewx
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/1,561 kB of archives.
After this operation, 5,754 kB of additional disk space will be used.
Preconfiguring packages ...
Selecting previously unselected package weewx.
(Reading database ... 166844 files and directories currently installed.)
Preparing to unpack .../archives/weewx_5.1.0-4_all.deb ...
Unpacking weewx (5.1.0-4) ...
Setting up weewx (5.1.0-4) ...
Found 0 running instances of weewxd
Using weewx:weewx as user:group
User ted is already in group weewx

Installing udev rules
sed: can't read /etc/weewx/udev/weewx.rules: No such file or directory
dpkg: error processing package weewx (--configure):
 installed weewx package post-installation script subprocess returned error exit status 2
Errors were encountered while processing:
 weewx
E: Sub-process /usr/bin/dpkg returned an error code (1)

Contents of /etc/weewx:

ted@weewx:~ $ ls -lR /etc/weewx
/etc/weewx:
total 32
drwxr-xr-x 8 root root 4096 Oct  2 11:29 examples
drwxr-xr-x 2 root root 4096 Oct  2 11:29 import
drwxr-xr-x 2 root root 4096 Oct  2 11:29 init.d
drwxr-xr-x 2 root root 4096 Oct  2 11:29 logrotate.d
drwxr-xr-x 4 root root 4096 Oct  2 11:29 logwatch
drwxr-xr-x 2 root root 4096 Oct  2 11:29 rsyslog.d
drwxr-xr-x 2 root root 4096 Oct  2 11:29 systemd
drwxr-xr-x 2 root root 4096 Oct  2 11:29 udev

/etc/weewx/examples:
total 24
drwxr-xr-x 3 root root 4096 Oct  2 11:29 basic
drwxr-xr-x 2 root root 4096 Oct  2 11:29 colorize
drwxr-xr-x 3 root root 4096 Oct  2 11:29 fileparse
drwxr-xr-x 4 root root 4096 Oct  2 11:29 pmon
drwxr-xr-x 2 root root 4096 Oct  2 11:29 tests
drwxr-xr-x 4 root root 4096 Oct  2 11:29 xstats

/etc/weewx/examples/basic:
total 4
drwxr-xr-x 3 root root 4096 Oct  2 11:29 skins

/etc/weewx/examples/basic/skins:
total 4
drwxr-xr-x 3 root root 4096 Oct  2 11:29 Basic

/etc/weewx/examples/basic/skins/Basic:
total 4
drwxr-xr-x 2 root root 4096 Oct  2 11:29 lang

/etc/weewx/examples/basic/skins/Basic/lang:
total 0

/etc/weewx/examples/colorize:
total 0

/etc/weewx/examples/fileparse:
total 4
drwxr-xr-x 3 root root 4096 Oct  2 11:29 bin

/etc/weewx/examples/fileparse/bin:
total 4
drwxr-xr-x 2 root root 4096 Oct  2 11:29 user

/etc/weewx/examples/fileparse/bin/user:
total 0

/etc/weewx/examples/pmon:
total 8
drwxr-xr-x 3 root root 4096 Oct  2 11:29 bin
drwxr-xr-x 3 root root 4096 Oct  2 11:29 skins

/etc/weewx/examples/pmon/bin:
total 4
drwxr-xr-x 2 root root 4096 Oct  2 11:29 user

/etc/weewx/examples/pmon/bin/user:
total 0

/etc/weewx/examples/pmon/skins:
total 4
drwxr-xr-x 2 root root 4096 Oct  2 11:29 pmon

/etc/weewx/examples/pmon/skins/pmon:
total 0

/etc/weewx/examples/tests:
total 0

/etc/weewx/examples/xstats:
total 8
drwxr-xr-x 3 root root 4096 Oct  2 11:29 bin
drwxr-xr-x 3 root root 4096 Oct  2 11:29 skins

/etc/weewx/examples/xstats/bin:
total 4
drwxr-xr-x 2 root root 4096 Oct  2 11:29 user

/etc/weewx/examples/xstats/bin/user:
total 0

/etc/weewx/examples/xstats/skins:
total 4
drwxr-xr-x 2 root root 4096 Oct  2 11:29 xstats

/etc/weewx/examples/xstats/skins/xstats:
total 0

/etc/weewx/import:
total 0

/etc/weewx/init.d:
total 0

/etc/weewx/logrotate.d:
total 0

/etc/weewx/logwatch:
total 8
drwxr-xr-x 4 root root 4096 Oct  2 11:29 conf
drwxr-xr-x 3 root root 4096 Oct  2 11:29 scripts

/etc/weewx/logwatch/conf:
total 8
drwxr-xr-x 2 root root 4096 Oct  2 11:29 logfiles
drwxr-xr-x 2 root root 4096 Oct  2 11:29 services

/etc/weewx/logwatch/conf/logfiles:
total 0

/etc/weewx/logwatch/conf/services:
total 0

/etc/weewx/logwatch/scripts:
total 4
drwxr-xr-x 2 root root 4096 Oct  2 11:29 services

/etc/weewx/logwatch/scripts/services:
total 0

/etc/weewx/rsyslog.d:
total 0

/etc/weewx/systemd:
total 0

/etc/weewx/udev:
total 0

matthew wall

unread,
Oct 3, 2025, 10:49:26 PM (12 days ago) Oct 3
to weewx...@googlegroups.com
something is preventing apt from copying the weewx.rules file (as well as many others) from the .deb package into the new /etc/weewx directory. so when the postinst script tries to do a configure, it fails.

you might be able to get more information from the apt log. take a look in /var/log/apt/term.log for signs of the weewx install/remove.

it looks like you had weewx with rc (not systemd) installed before this installation - did you upgrade from an older version of weewx? was weewx installed using a non-apt method before you tried the apt install of weewx? did you upgrade the operating system or is this on a clean install of debian 12?

try doing a complete purge of weewx, followed by an install.

first make a backup copy of your weewx database if you have not done so already:

sudo cp -p /var/lib/weewx/weewx.sdb ~

then you can purge weewx:

sudo apt purge weewx
sudo rm -r /var/www/html/weewx
sudo rm -r /var/lib/weewx
sudo rm -r /etc/weewx
sudo rm /etc/default/weewx

if an install after this still fails, then you might have to do an even deeper purge by doing those steps again, plus the following to remove the weewx user and group before doing a clean install:

sudo gpasswd -d $USER weewx
sudo userdel weewx
sudo groupdel weewx

the instructions for a complete purge are in the 'uninstall' section of the debian quick-start
> --
> 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 visit https://groups.google.com/d/msgid/weewx-user/b2342c95-a02e-4bab-87c3-df6921f296e7n%40googlegroups.com.

lav...@gmail.com

unread,
Oct 6, 2025, 1:22:16 PM (10 days ago) Oct 6
to weewx...@googlegroups.com
Hello Matthew, yes this was a initially a version 4 install that I upgraded, then tried to wipe and then tried start from scratch in terms of both OS and the weewx application when the upgrade went sideways. Likely at one point I had two installation types working at cross purposes. Will purge and reinstall...

Cheers,

TL
You received this message because you are subscribed to a topic in the Google Groups "weewx-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/weewx-user/FKO5RrYGA5U/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/weewx-user/3FD961A1-EC04-436C-A6D4-0E5ED75309A5%40gmail.com.

Reply all
Reply to author
Forward
0 new messages