Troubleshooting
Why CODESYS reports package architecture armhf does not match armel
Short answer
dpkg on the controller rejects both CODESYS archives because their declared architecture is armhf while the accepted list holds only armel; registering armhf with dpkg --add-architecture armhf fixes the install once the package is confirmed for the controller's firmware. The tar time-stamp warnings come from a controller clock stuck in 2019 and are corrected separately with date -s or NTP.
On this page
The CODESYS runtime deployment stops at the package-install step because dpkg on the controller refuses both archives: each package's Architecture field says armhf, while the controller's package manager accepts armel only. The tar lines about time stamps in the future are a second, separate fault — a controller clock stuck at February 13, 2019 — and they do not fail the install. Fix both, in this order: confirm the runtime package matches the controller's documented firmware, register armhf with dpkg --add-architecture armhf, then set the clock with date -s or NTP and redeploy.
What dpkg is rejecting #
- A Debian package declares its target in the Architecture field of its control file:
allfor architecture-independent packages, or a name such asamd64,armelorarmhf. - dpkg installs a package only when that name is on the controller's accepted-architecture list. This controller's list holds
armel, so anarmhfpackage is foreign and refused. armelandarmhfare different ARM ABI designations, not spelling variants:armhfuses the hard floating-point calling convention,armelthe soft-float one. That is a binary-level difference, which is why dpkg enforces it.- Registering
armhfchanges only what dpkg accepts. It does not translate code or replace libraries, so it cannot rescue a package that was never built for this controller.
The log holds two faults, not one #
Read the deployment log by operation:
- The PLC is discovered, the SSH login works, the firmware query and package-list refresh run: reachability and authentication are fine. Stop troubleshooting the network.
- The ARP package transfers and fails at install, then the tool stops the runtime, stores the existing configuration file, removes the old package, transfers the new runtime and fails again at install. One failed run can leave the old runtime removed and the new one absent — check the final runtime state after any failed attempt.
- Both failures are the same dpkg rejection:
dpkg: error processing archive /tmp/codesys-arp_arm_plcnext_19.6.0.deb (--install):
package architecture (armhf) does not match system (armel)
dpkg: error processing archive /tmp/codesyscontrol_arm_plcnext_V3.5.15.40.deb (--install):
package architecture (armhf) does not match system (armel)
- The same mismatch on two independent archives identifies a shared package-acceptance problem, not a corrupted download.
- One identifier check before you go further: the deployment tool reported release
3.5.15.4, while the runtime archive is namedcodesyscontrol_arm_plcnext_V3.5.15.40.deb. Record both strings and resolve them against the package's release information; do not edit the filename or treat the two as interchangeable.
Register armhf on the controller #
Prerequisite: confirm the package and firmware combination first. CODESYS Control for PLCnext SL is documented for the AXC F 2152 and AXC F 1152 controllers, and the current requirements call for firmware 2023.0 or later for the 2023 line and 2024.0.6 or later for the 2024 line, with LTS versions only supported. If the controller's firmware is below the documented minimum for your runtime version, update the firmware; architecture registration does not make an unsupported combination work.
With that confirmed, register the architecture as root:
sudo dpkg --add-architecture armhf
This was the exact correction that let both packages install cleanly in the reported case. Then re-run the deployment tool so it refreshes the package list and retries the installs against the widened list.
Correct the controller clock #
The time stamp ... is ... s in the future lines mean archive entries carry modification times ahead of the controller's clock. In this controller the clock read February 13, 2019 while the archives were stamped in July 2019 and March 2020.
- Read the controller's date, time and timezone, and compare all three with a trusted reference. A wrong timezone display and a wrong underlying clock need different corrections.
- Set the clock with the controller's supported time-setting facility. The successful correction used
date -swith an explicit date and time, for exampledate -s "2024-06-11 14:32:00"— supply the actual current values in the format the controller accepts. - For automatic correction, configure the controller's NTP settings instead of repeated manual sets, and confirm the synchronization status before redeploying.
- Read the clock back, and recheck it after any restart during commissioning. If it drifts back to 2019 again, diagnose clock retention or synchronization before trusting new timestamp warnings.
- One caution: changing system time reorders log and event timestamps, so record the correction for the maintenance history.
Worked example: how far the clock was off #
The log reports an archive entry stamped 2020-03-23 18:38:40 as 34,927,104 s in the future. Check it against the known clock:
- Days: 34,927,104 ÷ 86,400 = 404.25 days, and 404 × 86,400 s = 34,905,600 s.
- Remainder: 34,927,104 − 34,905,600 = 21,504 s = 5 h 58 min 24 s.
- Cross-check by calendar: 2019-02-13 to 2020-02-13 is 365 days, and 2020-02-13 to 2020-03-23 is 39 days (2020 is a leap year), giving 404 days. The arithmetic closes.
So the controller sat about 404 days and 6 hours behind the archive timestamps — a clock fault, nothing more.
Retry and verify #
- Re-run the deployment. Both archives should install with no dpkg architecture error, and the tar warnings should be gone because the clock now sits after the archive timestamps.
- Confirm the runtime starts and the controller accepts an online login from the engineering tool.
- Re-read the date once more after the runtime restart; a clean first boot with a wrong second boot points at clock retention, not at the packages.
The decision for each case #
- Both archives rejected with the armhf/armel mismatch, as here: confirm firmware meets the runtime's documented minimum, run
sudo dpkg --add-architecture armhf, redeploy. That is the fix. - Only one archive rejected: that component's package does not match the controller environment; obtain the matching package for it rather than registering anything.
- The dpkg error persists after registration: the package/firmware combination is wrong for this controller — check the firmware against the documented minimum versions before trying anything else.
- Only tar timestamp warnings, no dpkg error: the packages are fine; correct the clock with
date -sor NTP and move on.
Questions asked
Does adding armhf convert armel code into armhf code?
No. Registering armhf only widens the set of packages dpkg will accept; it does not translate executable code, substitute libraries, or change the processor ABI. The runtime binaries still have to be built for the controller's CPU and firmware, which is why you confirm the package and firmware combination before touching the architecture list.
Can I remove armhf again after the installation?
dpkg can drop a foreign architecture again, but keep armhf registered for as long as the runtime packages remain installed: dpkg needs the architecture on its list to track, upgrade and cleanly remove those packages later. Remove it only after the armhf packages are uninstalled, and expect the next runtime update to need it back.
Why did the deployment continue after the first package failed?
The deployment tool runs a fixed sequence: it stops the runtime, stores the existing configuration file, removes the old package, transfers the new archive and installs it, regardless of an earlier rejection. A failed run can therefore leave the old runtime removed and the new one not installed, so always check the final runtime state, not just the error count.
Would this error appear on a Raspberry Pi controller too?
Not in this form. The armel versus armhf choice belongs to the operating system image, not the CPU alone; a typical Raspberry Pi OS image is armhf natively, so armhf runtime packages install without registration. The mismatch shows up on images built as armel, which is why the fix is scoped to the controller and firmware documented for the runtime package.
Do the tar time-stamp-in-the-future warnings corrupt the installed files?
No. tar extracts the files and only warns that their stored modification times are ahead of the system clock; installation proceeds. The warnings matter because they prove the clock is wrong, and a wrong clock mislabels log entries, certificates and time-stamped events. Correct the clock so the warnings disappear and the records stay trustworthy.