aws / aws-iot-device-sdk-arduino-yun

SDK for connecting to AWS IoT from an Arduino Yún.
Apache License 2.0
163 stars 77 forks source link

Install instructions fail: opkg_install_cmd: Cannot install package distribute. #26

Closed pbudzon closed 7 years ago

pbudzon commented 7 years ago

Hi,

I have a new Arduino UNO with the Yun shield. I'm trying to get the SDK installed, I'm running AWSIoTArduinoYunInstallAll.sh as in the install instructions, the full output:

./AWSIoTArduinoYunInstallAll.sh 172.20.0.62 root xxx
This script will install all of the depencies and upload the codebase and credentials to the targeted Arduino Yun Board for the AWS IoT Arduino Yun SDK, which includes:
- Install dependencies
- Upload codebase
- Upload credentials
Please make sure you have included your credentials (private key, certificate and rootCA) in AWS-IoT-Python-Runtime/certs/
Changing permissions for functional scripts...
Done.
Uploading codebase and credentials...
Arduino Yun IP is: 172.20.0.62
Arduino Yun User Name is: root

Now start transmitting ./AWS-IoT-Python-Runtime to remote directory: root@172.20.0.62:/root/ ...
spawn scp -r ./AWS-IoT-Python-Runtime root@172.20.0.62:/root/
root@172.20.0.62's password: 
.DS_Store                                                                                                         100% 6148     6.0KB/s   00:00    
3bb6658c3c-certificate.pem.crt                                                                                    100% 1220     1.2KB/s   00:00    
3bb6658c3c-private.pem.key                                                                                        100% 1675     1.6KB/s   00:00    
VeriSign-Class 3-Public-Primary-Certification-Authority-G5.pem                                                    100% 1758     1.7KB/s   00:00    
__init__.py                                                                                                       100%    0     0.0KB/s   00:00    
communicationServer.py                                                                                            100% 1165     1.1KB/s   00:00    
serialCommunicationServer.py                                                                                      100% 7211     7.0KB/s   00:00    
__init__.py                                                                                                       100%    0     0.0KB/s   00:00    
AWSIoTCommand.py                                                                                                  100% 1324     1.3KB/s   00:00    
commandConfig.py                                                                                                  100% 2050     2.0KB/s   00:00    
commandConnect.py                                                                                                 100% 2441     2.4KB/s   00:00    
commandDisconnect.py                                                                                              100% 2000     2.0KB/s   00:00    
commandJSONKeyVal.py                                                                                              100% 3393     3.3KB/s   00:00    
commandLockSize.py                                                                                                100% 1559     1.5KB/s   00:00    
commandPublish.py                                                                                                 100% 2544     2.5KB/s   00:00    
commandSetBackoffTiming.py                                                                                        100% 2049     2.0KB/s   00:00    
commandSetDrainingIntervalSecond.py                                                                               100% 1932     1.9KB/s   00:00    
commandSetOfflinePublishQueueing.py                                                                               100% 2553     2.5KB/s   00:00    
commandShadowDelete.py                                                                                            100% 4075     4.0KB/s   00:00    
commandShadowGet.py                                                                                               100% 4063     4.0KB/s   00:00    
commandShadowRegisterDeltaCallback.py                                                                             100% 3257     3.2KB/s   00:00    
commandShadowUnregisterDeltaCallback.py                                                                           100% 3284     3.2KB/s   00:00    
commandShadowUpdate.py                                                                                            100% 4231     4.1KB/s   00:00    
commandSubscribe.py                                                                                               100% 2908     2.8KB/s   00:00    
commandUnsubscribe.py                                                                                             100% 2673     2.6KB/s   00:00    
commandYield.py                                                                                                   100% 1178     1.2KB/s   00:00    
__init__.py                                                                                                       100%    0     0.0KB/s   00:00    
AWSIoTExceptions.py                                                                                               100%  786     0.8KB/s   00:00    
operationError.py                                                                                                 100%  703     0.7KB/s   00:00    
operationTimeoutException.py                                                                                      100%  716     0.7KB/s   00:00    
__init__.py                                                                                                       100%    0     0.0KB/s   00:00    
jsonManager.py                                                                                                    100% 4360     4.3KB/s   00:00    
delete.me                                                                                                         100%    0     0.0KB/s   00:00    
__init__.py                                                                                                       100%    0     0.0KB/s   00:00    
run.py                                                                                                            100%  721     0.7KB/s   00:00    
runtimeHub.py                                                                                                     100%   18KB  18.0KB/s   00:00    
Completed!
Done.
Installing dependencies on Arduino Yun...
Arduino Yun IP is: 172.20.0.62
Arduino Yun User Name is: root

The following dependencies will be remotely installed on Arduino Yun:
distribute
python-openssl

Please wait until the installation completes and the program exits.

spawn ssh root@172.20.0.62
root@172.20.0.62's password: 

BusyBox v1.23.2 (2016-03-23 22:30:11 UTC) built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 CHAOS CALMER (1.6.1, r48749) - Arduino Yun101 and Yun Shield
root@YunArduino:~# opkg update
Downloading http://downloads.arduino.cc/openwrtyun/1.6.1/packages/base/Packages.gz.
Updated list of available packages in /var/opkg-lists/chaoscalmer_base.
Downloading http://downloads.arduino.cc/openwrtyun/1.6.1/packages/base/Packages.sig.
Signature check passed.
Downloading http://downloads.arduino.cc/openwrtyun/1.6.1/packages/arduino/Packages.gz.
Updated list of available packages in /var/opkg-lists/chaoscalmer_arduino.
Downloading http://downloads.arduino.cc/openwrtyun/1.6.1/packages/arduino/Packages.sig.
Signature check passed.
Downloading http://downloads.arduino.cc/openwrtyun/1.6.1/packages/custom/Packages.gz.
Updated list of available packages in /var/opkg-lists/chaoscalmer_custom.
Downloading http://downloads.arduino.cc/openwrtyun/1.6.1/packages/custom/Packages.sig.
Signature check passed.
Downloading http://downloads.arduino.cc/openwrtyun/1.6.1/packages/juci/Packages.gz.
Updated list of available packages in /var/opkg-lists/chaoscalmer_juci.
Downloading http://downloads.arduino.cc/openwrtyun/1.6.1/packages/juci/Packages.sig.
Signature check passed.
Downloading http://downloads.arduino.cc/openwrtyun/1.6.1/packages/luci/Packages.gz.
Updated list of available packages in /var/opkg-lists/chaoscalmer_luci.
Downloading http://downloads.arduino.cc/openwrtyun/1.6.1/packages/luci/Packages.sig.
Signature check passed.
Downloading http://downloads.arduino.cc/openwrtyun/1.6.1/packages/management/Packages.gz.
Updated list of available packages in /var/opkg-lists/chaoscalmer_management.
Downloading http://downloads.arduino.cc/openwrtyun/1.6.1/packages/management/Packages.sig.
Signature check passed.
Downloading http://downloads.arduino.cc/openwrtyun/1.6.1/packages/owrt_pub_feeds/Packages.gz.
Updated list of available packages in /var/opkg-lists/chaoscalmer_owrt_pub_feeds.
Downloading http://downloads.arduino.cc/openwrtyun/1.6.1/packages/owrt_pub_feeds/Packages.sig.
Signature check passed.
Downloading http://downloads.arduino.cc/openwrtyun/1.6.1/packages/packages/Packages.gz.
Updated list of available packages in /var/opkg-lists/chaoscalmer_packages.
Downloading http://downloads.arduino.cc/openwrtyun/1.6.1/packages/packages/Packages.sig.
Signature check passed.
Downloading http://downloads.arduino.cc/openwrtyun/1.6.1/packages/routing/Packages.gz.
Updated list of available packages in /var/opkg-lists/chaoscalmer_routing.
Downloading http://downloads.arduino.cc/openwrtyun/1.6.1/packages/routing/Packages.sig.
Signature check passed.
Downloading http://downloads.arduino.cc/openwrtyun/1.6.1/packages/telephony/Packages.gz.
Updated list of available packages in /var/opkg-lists/chaoscalmer_telephony.
Downloading http://downloads.arduino.cc/openwrtyun/1.6.1/packages/telephony/Packages.sig.
Signature check passed.
root@YunArduino:~# opkg install distribute
Unknown package 'distribute'.
Collected errors:
 * opkg_install_cmd: Cannot install package distribute.
root@YunArduino:~# opkg install python-openssl
Package python-openssl (2.7.9-6) installed in root is up to date.
root@YunArduino:~# easy_install pip
-ash: easy_install: not found
root@YunArduino:~# pip install AWSIoTPythonSDK==1.0.0
-ash: pip: not found
root@YunArduino:~# exit
Connection to 172.20.0.62 closed.
Done.
Execution completed!

I tried running opkg update and opkg install distribute manually (via ssh), fails the same.
opkg search distribute returns nothing.

Has the package been moved, renamed, deleted?

Thanks.

rpcme commented 7 years ago

What is the image you're running? It might be old, or opkg.conf might require updating.

pbudzon commented 7 years ago

I just uploaded the latest image (1.6.2) for Yun from https://www.arduino.cc/en/Main/Software

This Yún runs a version of OpenWrt-Yun built on May 13, 2016

It's what comes in it out of the box, no changes. My /etc/opkg.conf:

dest root /
dest ram /tmp
lists_dir ext /var/opkg-lists
option overlay_root /overlay
option check_signature 1

Still getting the same error :(

rpcme commented 7 years ago

Please see this link to configure the opkg.conf to point to packages: http://www.geeetech.com/forum/viewtopic.php?p=27563&sid=4b3733618c6159f3d2612c46b071a88f

The package list is here, and 'distribute' is there: http://downloads.arduino.cc/openwrtyun/1/packages/

Perhaps this should be added to the documentation.

pbudzon commented 7 years ago

Thanks! Had to add

src/gz attitude_adjustment http://downloads.arduino.cc/openwrtyun/1/packages

to the configuration and remove

option check_signature 1

since there seems to be something wrong with the signature at http://downloads.arduino.cc/openwrtyun/1/packages/Packages.sig

The installer worked perfectly after that.

Thanks!