Follow the official installation instructions of pi4jp( http://pi4j.com/install.html )Install
curl -s get.pi4j.com | sudo bash
After the installation, the Java program is executed and the following error is reported
At first, I thought it was a problem with wiringpi. After a long time, I found that it was a problem with the version of the pi4j installation package
The default installation is version 1.1. Raspberry Pie 3 needs version 1.2 to run normally, so you need to manually download the 1.2 installation again
Uninstall 1.1 for automatic installation first
curl -s get.pi4j.com/uninstall | sudo bash
install 1.2
wget http://get.pi4j.com/download/pi4j-1.2-SNAPSHOT.deb
Installation
sudo dpkg -i pi4j-1.2-SNAPSHOT.deb
Execute Java again, success
Similar Posts:
- OS X: equivalent to WGet of Linux
- Raspberry Pi 4B+Ubuntu20.04 Solve Error sudo: raspi-config: command not found
- [Solved] CURL Install Error: GnuTLS: The TLS connection was non-properly terminated. Unable to establish SSL connection.
- -Two solutions to bash: WGet: command not found
- Centos7.4 appears Yum command not found [How to Solve]
- Linux environment installation MYSQL Error: Redirecting to /bin/systemctl start mysqld.service Failed to start mysqld.service: Unit not found.
- Installing Google Chrome in Ubuntu 14.04 LTS
- [Solved] Centos6: Python 2.6 upgrade to 3.7, error handling [no module named ‘_ctypes’]
- [Solved] pycurl.error: (35, ‘gnutls_handshake() failed: An unexpected TLS packet was received.’)