SOLUTION FOR UBUNTU (works with version 1.5.3)
General Explanation:
The file opencr.tar.bz2 is not compressed with bzip2 but with gzip (https://github.com/ROBOTIS-GIT/OpenCR/releases/download/1.5.3/opencr.tar.bz2).
Problem Resolution Strategy:
Create a local copy on an HTTP server, like LAMP, of the following file:
https://raw.githubusercontent.com/ROBOTIS-GIT/OpenCR/master/arduino/opencr_release/package_opencr_index.json
and replace the opencr.tar.bz2 archive with a true bzip2-compressed version!
Remember to modify/recalculate the checksum with sha256sum and update the byte length of opencr.tar.bz2 in the JSON file!
Detailed Explanation:
Install the LAMP HTTP server:
sudo apt update
sudo apt install apache2 php libapache2-mod-php mysql-server php-mysql
In /var/www/html, get the main folder of the Git project https://github.com/ROBOTIS-GIT/OpenCR:
cd /var/www/html
sudo git clone https://github.com/ROBOTIS-GIT/OpenCR
Install Arduino software 1.8.19:
Download “Linux 64 bits” in “Legacy IDE (1.8.X)”: https://www.arduino.cc/en/software
In Arduino software 1.8.19, replace the URL in “File/Preferences/Additional Boards Manager URLs” with the following local URL:
http://localhost/OpenCR/arduino/opencr_release/package_opencr_index.json
In this previous JSON file, the file (https://github.com/ROBOTIS-GIT/OpenCR/releases/download/1.5.3/opencr.tar.bz2) is not in bzip2 format!
Download https://github.com/ROBOTIS-GIT/OpenCR/releases/download/1.5.3/opencr.tar.bz2.
Decompress with gzip:
tar xvzf opencr.tar.bz2
Recompress with bzip2:
tar cjf opencr.tar.bz2 opencr
Recalculate the checksum:
sha256sum opencr.tar.bz2
ccc4f702f0e5306d1ec5f8bf6b9a88bf67c190b7c4222e35dc9bfccd6cd35731 opencr.tar.bz2
The exact size of opencr.tar.bz2 is 2022887 bytes.
Copy the new opencr.tar.bz2 file to the local website:
sudo cp opencr.tar.bz2 /var/www/html/OpenCR/arduino/opencr_release
Update the JSON content using an editor like Geany, for example:
sudo geany /var/www/html/OpenCR/arduino/opencr_release/package_opencr_index.json
In this JSON file, replace the section:
{
"name": "OpenCR",
"architecture": "OpenCR",
"version": "1.5.3",
"category": "Arduino",
"help": {
"online": "https://github.com/ROBOTIS-GIT/OpenCR"
},
"url": "https://github.com/ROBOTIS-GIT/OpenCR/releases/download/1.5.3/opencr.tar.bz2",
"archiveFileName": "opencr.tar.bz2",
"checksum": "SHA-256:418656e5e6d99d45d187ffdb28dece0f450c6707da3f6db56769f3ecafdc413c",
"size": "2690860",
"help": {
"online": "http://emanual.robotis.com/docs/en/parts/controller/opencr10/"
},
"boards": [
{"name": "OpenCR"}
],
"toolsDependencies": [
{
"packager": "OpenCR",
"name": "opencr_gcc",
"version": "5.4.0-2016q2"
},
{
"packager": "OpenCR",
"name": "opencr_tools",
"version": "1.0.0"
}
]
}
With:
{
"name": "OpenCR",
"architecture": "OpenCR",
"version": "1.5.3",
"category": "Arduino",
"help": {
"online": "https://github.com/ROBOTIS-GIT/OpenCR"
},
"url": "http://localhost/OpenCR/arduino/opencr_release/opencr.tar.bz2",
"archiveFileName": "opencr.tar.bz2",
"checksum": "SHA-256:ccc4f702f0e5306d1ec5f8bf6b9a88bf67c190b7c4222e35dc9bfccd6cd35731",
"size": "2022887",
"help": {
"online": "http://emanual.robotis.com/docs/en/parts/controller/opencr10/"
},
"boards": [
{"name": "OpenCR"}
],
"toolsDependencies": [
{
"packager": "OpenCR",
"name": "opencr_gcc",
"version": "5.4.0-2016q2"
},
{
"packager": "OpenCR",
"name": "opencr_tools",
"version": "1.0.0"
}
]
}
Then retest the installation of version 1.5.3 of the OpenCR board!
Tools/Board/Boards Manager…/Filter your search => OpenCR / choose version 1.5.3.
Everything should be OK.