I came across the same issue today when trying to build elementary OS
based on Ubuntu 26.04 LTS and finally resolved. Sharing what is the
cause and how to fix it.
TL;DR: This is not an issue of dictionaries-common or aspell; it's because your
`/dev/null` is not a special device but a regular file.
In my case that happens when using a rootless Docker container as a build
environment. Uninstalling the rootless mode resolves the issue for me.
---
The error `Error: /dev/null:1: The key "/usr/bin/aspell" is unknown.`
complains about the content of your `/dev/null` looks like this and not
a valid configuration:
```
(live)root@16e5d9b5cabd:/# file /dev/null
/dev/null: ASCII text
(live)root@16e5d9b5cabd:/# cat /dev/null
/usr/bin/aspell
(live)root@16e5d9b5cabd:/#
```
The above error happens when running aspell with the `--per-
conf=/dev/null` option in the `scripts/system/aspell-autobuildhash` in
the dictionaries-common source package:
```
sub autorebuild {
my $lang = shift || # The dictionary name
myerror("aspell-autobuildhash","No argument passed to function
autorebuild");
my $old_remove_data = shift;
my $aspell_compat = shift; # aspell compat file
my $langsfile = "$usrsharedir/$lang.contents"; # The subdicts file
my $options = " --per-conf=/dev/null "; # Make sure no
personal conf is used at all
(...snip...)
#$unpack = "$unpack | aspell clean strict";
my $command = "$unpack | aspell $options --local-data-dir=$datadir
--lang=$lang create master $hash";
if ( $dry_run ){
```
And this is the place where the content of `/dev/null` becomes
`/usr/bin/aspell` in the same aspell-autobuildhash file:
```
$force++ unless $aspell_compat;
if ( system("command -v aspell >/dev/null" ) == 0 ){
foreach my $compat ( <$compatdir/*.compat> ){
```
The above line is completely correct code normally but results writing
the full path of aspell into `/dev/null` if it's not a special device.
See also the history of my troubleshooting in the elementary project:
https://github.com/elementary/os/issues/803
** Bug watch added: github.com/elementary/os/issues #803
https://github.com/elementary/os/issues/803
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2062979
Title:
unable to create ubuntu-noble image due to dictionaries-common config
failure
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/aspell/+bug/2062979/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs