Problems with apt-get (openjdk-7-jre-headless)


#1

I am attempting to install the Arduino development environment under Ubuntu on the 410c board. It should be easy, the instructions I was given say to do the following:

sudo apt-get install arduino-mk
sudo apt-get install arduino

Unfortunately when I try the apt-get gets to the step where it is trying to load openjdk-7-jre-headless, it has one of two problems. 1) it stops loading when it gets to 4945kB/38.6MB,(always the same place) or 2) it finished loading, but then apt-get complains the download is the wrong size and refuses to go any further.

I tried some obvious things (in no particular order):

sudo apt-get install --fix-missing arduino
sudo apt-get clean
sudo apt-get update

Curiously when I attempt the update I always get a duplicate packages error:

Hit http://repo.linaro.org vivid InRelease
Hit http://repo.linaro.org vivid InRelease
Hit http://ports.ubuntu.com vivid InRelease
Hit http://repo.linaro.org vivid/main arm64 Packages
Hit http://repo.linaro.org vivid/main Sources
Hit http://repo.linaro.org vivid/main arm64 Packages
Hit http://ports.ubuntu.com vivid/main Sources
Hit http://ports.ubuntu.com vivid/universe Sources
Ign http://repo.linaro.org vivid/main Translation-en
Ign http://repo.linaro.org vivid/main Translation-en
Hit http://ports.ubuntu.com vivid/main Translation-en
Hit http://ports.ubuntu.com vivid/universe Translation-en
Hit http://ports.ubuntu.com vivid/main arm64 Packages
Hit http://ports.ubuntu.com vivid/universe arm64 Packages
Reading package lists... Done
W: Duplicate sources.list entry http://ports.ubuntu.com/ubuntu-ports/ vivid/main arm64 Packages (/var/lib/apt/lists/ports.ubuntu.com_ubuntu-ports_dists_vivid_main_binary-arm64_Packages)
W: Duplicate sources.list entry http://ports.ubuntu.com/ubuntu-ports/ vivid/universe arm64 Packages (/var/lib/apt/lists/ports.ubuntu.com_ubuntu-ports_dists_vivid_universe_binary-arm64_Packages)
W: You may want to run apt-get update to correct these problems

Any hints on what I need to do to get the Arduino package installed?


#2

What release are you using?
I just installed 15.11 and the installation completed only by doing:


sudo apt-get install arduino-mk
sudo apt-get install arduino

Upgrading to Debian (15.11) is highly recommended.


#3

I was on the 15.09 Ubuntu release. I will try again with Debian.

Full Disclosure: I am an employee of Qualcomm Canada. Any opinions I may have expressed in this or any other post may not reflect the opinions of my employer.


#4

Hi,

I were able to install followings successfully on Debian 15.11.


root@linaro-alip:~# sudo apt-get install arduino-mk
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  arduino-core avr-libc avrdude binutils-avr gcc-avr libelf1 libftdi1
  python-serial
Suggested packages:
  avrdude-doc task-c-devel gcc-doc python-wxgtk3.0 python-wxgtk
The following NEW packages will be installed:
  arduino-core arduino-mk avr-libc avrdude binutils-avr gcc-avr libelf1
  libftdi1 python-serial
0 upgraded, 9 newly installed, 0 to remove and 5 not upgraded.
Need to get 17.4 MB of archives.
After this operation, 112 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://http.debian.net/debian/ jessie/main libelf1 arm64 0.159-4.2 [155 k]
Get:2 http://http.debian.net/debian/ jessie/main libftdi1 arm64 0.20-2 [16.9 kB]
Get:3 http://http.debian.net/debian/ jessie/main python-serial all 2.6-1.1 [66.]
Get:4 http://http.debian.net/debian/ jessie/main binutils-avr arm64 2.24+Atmel3]
Get:5 http://http.debian.net/debian/ jessie/main gcc-avr arm64 1:4.8.1+Atmel3.4]
Get:6 http://http.debian.net/debian/ jessie/main avrdude arm64 6.1-2 [244 kB]  
Get:7 http://http.debian.net/debian/ jessie/main avr-libc all 1:1.8.0+Atmel3.4.]
Get:8 http://http.debian.net/debian/ jessie/main arduino-core all 2:1.0.5+dfsg2]
Get:9 http://http.debian.net/debian/ jessie/main duino-mk all 1.3.4-1 [28.0 kB]
Fetched 17.4 MB in 29s (584 kB/s)                                              
Selecting previously unselected package libelf1:arm64.
(Reading database ... 69349 files and directories currently installed.)
Preparing to unpack .../libelf1_0.159-4.2_arm64.deb ...
Unpacking libelf1:arm64 (0.159-4.2) ...
Selecting previously unselected package libftdi1:arm64.
Preparing to unpack .../libftdi1_0.20-2_arm64.deb ...
Unpacking libftdi1:arm64 (0.20-2) ...
Selecting previously unselected package python-serial.
Preparing to unpack .../python-serial_2.6-1.1_all.deb ...
Unpacking python-serial (2.6-1.1) ...
Selecting previously unselected package binutils-avr.
Preparing to unpack .../binutils-avr_2.24+Atmel3.4.4-1_arm64.deb ...
Unpacking binutils-avr (2.24+Atmel3.4.4-1) ...
Selecting previously unselected package gcc-avr.
Preparing to unpack .../gcc-avr_1%3a4.8.1+Atmel3.4.4-2_arm64.deb ...
Unpacking gcc-avr (1:4.8.1+Atmel3.4.4-2) ...
Selecting previously unselected package avrdude.
Preparing to unpack .../avrdude_6.1-2_arm64.deb ...
Unpacking avrdude (6.1-2) ...
Selecting previously unselected package avr-libc.
Preparing to unpack .../avr-libc_1%3a1.8.0+Atmel3.4.4-1_all.deb ...
Unpacking avr-libc (1:1.8.0+Atmel3.4.4-1) ...
Selecting previously unselected package arduino-core.
Preparing to unpack .../arduino-core_2%3a1.0.5+dfsg2-4_all.deb ...
Unpacking arduino-core (2:1.0.5+dfsg2-4) ...
Selecting previously unselected package arduino-mk.
Preparing to unpack .../arduino-mk_1.3.4-1_all.deb ...
Unpacking arduino-mk (1.3.4-1) ...
Setting up libelf1:arm64 (0.159-4.2) ...
Setting up libftdi1:arm64 (0.20-2) ...
Setting up python-serial (2.6-1.1) ...
Setting up binutils-avr (2.24+Atmel3.4.4-1) ...
Setting up gcc-avr (1:4.8.1+Atmel3.4.4-2) ...
Setting up avrdude (6.1-2) ...
Setting up avr-libc (1:1.8.0+Atmel3.4.4-1) ...
Setting up arduino-core (2:1.0.5+dfsg2-4) ...
Setting up arduino-mk (1.3.4-1) ...
Processing triggers for libc-bin (2.19-18+deb8u1) ...
root@linaro-alip:~# sudo apt-get install arduino
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  libjna-java libjna-jni librxtx-java
Suggested packages:
  libjna-java-doc
Recommended packages:
  extra-xdg-menus
The following NEW packages will be installed:
  arduino libjna-java libjna-jni librxtx-java
0 upgraded, 4 newly installed, 0 to remove and 5 not upgraded.
Need to get 1560 kB of archives.
After this operation, 2925 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://http.debian.net/debian/ jessie/main libjna-java all 4.1.0-1 [163 k]
Get:2 http://http.debian.net/debian/ jessie/main arduino all 2:1.0.5+dfsg2-4 [1]
Get:3 http://http.debian.net/debian/ jessie/main libjna-jni arm64 4.1.0-1 [39.1]
Get:4 http://http.debian.net/debian/ jessie/main librxtx-java arm64 2.2pre2-13 ]
Fetched 1560 kB in 6s (245 kB/s)                                               
Selecting previously unselected package libjna-jni.
(Reading database ... 73593 files and directories currently installed.)
Preparing to unpack .../libjna-jni_4.1.0-1_arm64.deb ...
Unpacking libjna-jni (4.1.0-1) ...
Selecting previously unselected package libjna-java.
Preparing to unpack .../libjna-java_4.1.0-1_all.deb ...
Unpacking libjna-java (4.1.0-1) ...
Selecting previously unselected package librxtx-java.
Preparing to unpack .../librxtx-java_2.2pre2-13_arm64.deb ...
Unpacking librxtx-java (2.2pre2-13) ...
Selecting previously unselected package arduino.
Preparing to unpack .../arduino_2%3a1.0.5+dfsg2-4_all.deb ...
Unpacking arduino (2:1.0.5+dfsg2-4) ...
Processing triggers for desktop-file-utils (0.22-1) ...
Processing triggers for mime-support (3.58) ...
Processing triggers for hicolor-icon-theme (0.13-1) ...
Processing triggers for shared-mime-info (1.3-1+b2) ...
Setting up libjna-jni (4.1.0-1) ...
Setting up libjna-java (4.1.0-1) ...
Setting up librxtx-java (2.2pre2-13) ...
Setting up arduino (2:1.0.5+dfsg2-4) ...
Processing triggers for libc-bin (2.19-18+deb8u1) ...
root@linaro-alip:~#

What I did before the above were:
download the Debian installer from here:
http://builds.96boards.org/releases/dragonboard410c/linaro/debian/15.11/dragonboard410c_sdcard_install_debian-36.zip

And write the Debian to emmc by following the instruction here:

After connecting the keyboard/mouse and USB-Ethernet to the DragonBoard,
I booted the DragonBoard with Debian in emmc and
the first thing I tired was:


# ntpdate ntp.jst.mfeed.ad.jp
# apt-get update

because many times the updating the date is critical for apt-get update and install or compile anything.

I hope it works for you.