The Raspberry Pi based Curtain Controller project for my blind uncle is complete and almost ready to go to its new home. I have two RPi's - the one that is boxed up with the relay controller and one that is setup as a test environment so I can deal with any future problems or extra features.
In setting up the controller unit I obviously made a mess somewhere as nothing would install from CPAN whereas this was not a problem on the development unit. The development unit also has an HTTP server which is accessible via an ngrok tunnel ready for the unit at be Alexa enabled once I get Device Discovery working. This server needs adding to the controler and requires HTTP::Server::Simple so CPAN is necessary.
The development unit used an OS image with the network credentials added. This same image has now been used for the controller unit. So everything should be identical except that one has header pins soldered in and the other one doesn't!
Once the OS had installed and an SSH connection made I have changed the password then updated with:
sudo apt-get update
sudo apt-get upgrade
cpan install CPAN
With the development unit, running
CPAN and typing
install HTTP::Server::Simple installed lots and lots of dependencies taking nearly 4 hours but eventually installed.
On the unit that is to be shipped imminently, CPAN gets 'Killed' - this is the last block of what CPAN prints out:
Configuring E/ET/ETHER/Try-Tiny-0.30.tar.gz with Makefile.PL
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for Try::Tiny
Writing MYMETA.yml and MYMETA.json
ETHER/Try-Tiny-0.30.tar.gz
/usr/bin/perl Makefile.PL INSTALLDIRS=site -- OK
Running make for E/ET/ETHER/Try-Tiny-0.30.tar.gz
cp lib/Try/Tiny.pm blib/lib/Try/Tiny.pm
Manifying 1 pod document
ETHER/Try-Tiny-0.30.tar.gz
/usr/bin/make -- OK
The current configuration of allow_installing_outdated_dists is 'ask/y
+es', but for this option we would need 'CPAN::DistnameInfo' installed
+. Please install 'CPAN::DistnameInfo' as soon as possible. As long as
+ we are not equipped with 'CPAN::DistnameInfo' this option does not t
+ake effect
Running make test for ETHER/Try-Tiny-0.30.tar.gz
PERL_DL_NONLAZY=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::H
+arness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/l
+ib', 'blib/arch')" t/*.t
t/00-report-prereqs.t .......... #
# Versions for all modules listed in MYMETA.json (including optional o
+nes):
#
# === Configure Requires ===
#
# Module Want Have
# ------------------- ---- ----
# ExtUtils::MakeMaker any 7.34
#
# === Configure Suggests ===
#
# Module Want Have
# -------- ------- -------
# JSON::PP 2.27300 2.97001
#
# === Build Requires ===
#
# Module Want Have
# ------------------- ---- ----
# ExtUtils::MakeMaker any 7.34
#
# === Test Requires ===
#
# Module Want Have
# ------------------- ---- --------
# ExtUtils::MakeMaker any 7.34
# File::Spec any 3.74
# Test::More any 1.302133
# if any 0.0608
#
# === Test Recommends ===
#
# Module Want Have
# ---------- -------- --------
# CPAN::Meta 2.120900 2.150010
#
# === Test Suggests ===
#
# Module Want Have
# ------------------------ ----- -------
# CPAN::Meta::Check 0.011 missing
# CPAN::Meta::Requirements any 2.140
# Capture::Tiny 0.12 missing
#
# === Runtime Requires ===
#
# Module Want Have
# -------- ---- ----
# Carp any 1.50
# Exporter 5.57 5.73
# constant any 1.33
# strict any 1.11
# warnings any 1.42
#
# === Runtime Suggests ===
#
# Module Want Have
# --------- ---- -------
# Sub::Name 0.08 missing
# Sub::Util any 1.50
#
# === Other Modules ===
#
# Module Have
# ------------- -------
# JSON::PP 2.97001
# Pod::Coverage missing
# Sub::Name missing
# YAML missing
# autodie 2.29
#
t/00-report-prereqs.t .......... ok
t/basic.t ...................... ok
t/context.t .................... ok
t/erroneous_usage.t ............ ok
t/finally.t .................... ok
t/given_when.t ................. skipped: Tests skipped on perl 5.27.7
++, pending resolution of smartmatch changes
t/global_destruction_forked.t .. ok
t/global_destruction_load.t .... skipped: Capture::Tiny 0.12 required
t/named.t ...................... ok
t/when.t ....................... skipped: Tests skipped on perl 5.27.7
++, pending resolution of smartmatch changes
t/zzz-check-breaks.t ........... ok
All tests successful.
Files=11, Tests=97, 21 wallclock secs ( 0.78 usr 0.10 sys + 17.95 cus
+r 1.02 csys = 19.85 CPU)
Result: PASS
Killed
pi@eric:~ $
I've tried using CPAN to install just
Try::Tiny as this seems to be where things are failing. When I do this I get almost the same output with different wallclock values reported and
Lockfile removed. displayed on the line before
Killed and several minutes between them.
Searching for an answer suggests that this is the OS killing CPAN and the most probable cause is lack of memory. The development unit has a 32Gb SD card whereas the controller has 16Gb. But, there is plenty of space on the card:
pi@eric:~ $ df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/root 14989480 3552696 10774908 25% /
devtmpfs 188088 0 188088 0% /dev
tmpfs 221112 0 221112 0% /dev/shm
tmpfs 221112 3212 217900 2% /run
tmpfs 5120 0 5120 0% /run/lock
tmpfs 221112 0 221112 0% /sys/fs/cgroup
/dev/mmcblk0p1 258095 55052 203043 22% /boot
tmpfs 44220 4 44216 1% /run/user/1000
Two ostensibly identical units seem to be working differently.
Can you suggest anything I can try to debug this problem?