4

I'm trying to install Heroku locally into my Ubuntu 14.04 LTS.

But I'm getting this error:

The following NEW packages will be installed:
 heroku
0 upgraded, 1 newly installed, 0 to remove and 198 not upgraded.
1 not fully installed or removed.
Need to get 14,6 MB of archives.
After this operation, 0 B of additional disk space will be used.
Fetched 14,6 MB in 3s (4.497 kB/s)
Selecting previously unselected package heroku.
(Reading database ... 333239 files and directories currently installed.)
Preparing to unpack .../heroku_5.6.8-1_amd64.deb ...
Unpacking heroku (5.6.8-1) ...
Setting up oracle-java8-installer (8u92+8u91arm-2~really8u91~webupd8~0) ...
Installing from local file /var/cache/oracle-jdk8-installer/jdk-8u91-linux-x64.tar.gz
Removing outdated cached downloads...
mv: cannot move ‘jdk1.8.0_91’ to ‘java-8-oracle/jdk1.8.0_91’: Directory not empty
dpkg: error processing package oracle-java8-installer (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up heroku (5.6.8-1) ...
Errors were encountered while processing:
 oracle-java8-installer
E: Sub-process /usr/bin/dpkg returned an error code (1)

Anyone encountered this problem? And how to fix it? For the moment I was thinking to change the owner and the group for these two directories, but I don't know the implications.

Thank you for any suggestions!

LE

I forgot to mention the structure of these two directories:

6952928 drwxr-xr-x  9 uucp  143      4096 iul 22 19:41 java-8-oracle
6832129 drwxr-xr-x  8 uucp  143      4096 apr  1  2016 jdk1.8.0_91

which looks strange to me. Especially that uucp 143. If you need me to provide more info, please ask, as I'm not so advanced in Linux (or such).

Again, thanks!

LE2:

After following @Zanna 's idea, I renamed those two directories, and I ran the installer again. Unsuccessfull, as I get the following error:

heroku is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 198 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Setting up oracle-java8-installer (8u92+8u91arm-2~really8u91~webupd8~0) ...
Installing from local file /var/cache/oracle-jdk8-installer/jdk-8u91-linux-x64.tar.gz
Removing outdated cached downloads...
install: cannot stat ‘javaws-wrapper.sh’: No such file or directory
dpkg: error processing package oracle-java8-installer (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 oracle-java8-installer
E: Sub-process /usr/bin/dpkg returned an error code (1)

LE3

Yes, I'm using a ppa. I tried these steps to purge the package: I installed ppa-purge, then I ran the second command to remove it. I got this error:

# First I installed ppa-purge, and at the end, I got the same error: E: Sub-process /usr/bin/dpkg returned an error code (1)

sudo apt-get install ppa-purge
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  aptitude aptitude-common libboost-iostreams1.54.0 libcwidget3 libept1.4.12
Suggested packages:
  aptitude-doc-en aptitude-doc tasksel debtags libcwidget-dev
The following NEW packages will be installed:
  aptitude aptitude-common libboost-iostreams1.54.0 libcwidget3 libept1.4.12
  ppa-purge
0 upgraded, 6 newly installed, 0 to remove and 197 not upgraded.
1 not fully installed or removed.
Need to get 2.555 kB of archives.
After this operation, 10,7 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://ro.archive.ubuntu.com/ubuntu/ trusty-updates/main libboost-iostreams1.54.0 amd64 1.54.0-4ubuntu3.1 [29,0 kB]
Get:2 http://ro.archive.ubuntu.com/ubuntu/ trusty/main libept1.4.12 amd64 1.0.12 [142 kB]
Get:3 http://ro.archive.ubuntu.com/ubuntu/ trusty/main aptitude-common all 0.6.8.2-1ubuntu4 [700 kB]
Get:4 http://ro.archive.ubuntu.com/ubuntu/ trusty/main libcwidget3 amd64 0.5.16-3.5ubuntu1 [307 kB]
Get:5 http://ro.archive.ubuntu.com/ubuntu/ trusty/main aptitude amd64 0.6.8.2-1ubuntu4 [1.371 kB]
Get:6 http://ro.archive.ubuntu.com/ubuntu/ trusty/universe ppa-purge all 0.2.8+bzr57 [5.704 B]
Fetched 2.555 kB in 3s (670 kB/s)     
Selecting previously unselected package libboost-iostreams1.54.0:amd64.
(Reading database ... 333239 files and directories currently installed.)
Preparing to unpack .../libboost-iostreams1.54.0_1.54.0-4ubuntu3.1_amd64.deb ...
Unpacking libboost-iostreams1.54.0:amd64 (1.54.0-4ubuntu3.1) ...
Selecting previously unselected package libept1.4.12:amd64.
Preparing to unpack .../libept1.4.12_1.0.12_amd64.deb ...
Unpacking libept1.4.12:amd64 (1.0.12) ...
Selecting previously unselected package aptitude-common.
Preparing to unpack .../aptitude-common_0.6.8.2-1ubuntu4_all.deb ...
Unpacking aptitude-common (0.6.8.2-1ubuntu4) ...
Selecting previously unselected package libcwidget3.
Preparing to unpack .../libcwidget3_0.5.16-3.5ubuntu1_amd64.deb ...
Unpacking libcwidget3 (0.5.16-3.5ubuntu1) ...
Selecting previously unselected package aptitude.
Preparing to unpack .../aptitude_0.6.8.2-1ubuntu4_amd64.deb ...
Unpacking aptitude (0.6.8.2-1ubuntu4) ...
Selecting previously unselected package ppa-purge.
Preparing to unpack .../ppa-purge_0.2.8+bzr57_all.deb ...
Unpacking ppa-purge (0.2.8+bzr57) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Setting up oracle-java8-installer (8u92+8u91arm-2~really8u91~webupd8~0) ...
Installing from local file /var/cache/oracle-jdk8-installer/jdk-8u91-linux-x64.tar.gz
Removing outdated cached downloads...
mv: cannot move ‘jdk1.8.0_91’ to ‘java-8-oracle/jdk1.8.0_91’: Directory not empty
dpkg: error processing package oracle-java8-installer (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up libboost-iostreams1.54.0:amd64 (1.54.0-4ubuntu3.1) ...
Setting up libept1.4.12:amd64 (1.0.12) ...
Setting up aptitude-common (0.6.8.2-1ubuntu4) ...
Setting up libcwidget3 (0.5.16-3.5ubuntu1) ...
Setting up aptitude (0.6.8.2-1ubuntu4) ...
update-alternatives: using /usr/bin/aptitude-curses to provide /usr/bin/aptitude (aptitude) in auto mode
Setting up ppa-purge (0.2.8+bzr57) ...
Processing triggers for libc-bin (2.19-0ubuntu6.9) ...
Errors were encountered while processing:
 oracle-java8-installer
E: Sub-process /usr/bin/dpkg returned an error code (1)

# Here I tried to purge the package

sudo ppa-purge ppa:webupd8team/java
Updating packages lists
PPA to be removed: webupd8team java
Warning:  Could not find package list for PPA: webupd8team java

And now I can't understand why this warning, as both directories are in place. Additionaly, I got this error window too.

1 Answers1

3

Thanks to @Zanna's help, I was able to fix my problem. And because there are a lot of replies in the comment area below the original post, I'll say once more what my problem was:

I was trying to install Heroku CLI, but I couldn't, as an error came up at the end:

mv: cannot move ‘jdk1.8.0_91’ to ‘java-8-oracle/jdk1.8.0_91’: Directory not empty
dpkg: error processing package oracle-java8-installer (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up heroku (5.6.8-1) ...
Errors were encountered while processing:
 oracle-java8-installer
E: Sub-process /usr/bin/dpkg returned an error code (1)

So the fix was by using two simple terminal commands (which in turn purges the oracle-java8-installer, which caused the problem), as this nice post recommends:

sudo dpkg -P oracle-java8-installer
sudo apt-get -f install

Then I tried again to install Heroku CLI and it worked like a charm.

If you then need to reinstall oracle-java8-installer, you'll need to add again the webupd8team ppa:

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer

I must mention that I was able to install Heroku CLI without reinstalling oracle-java8-installer.

Now, if you think upvoting this answer, you'll need to thank to @Zanna, more than to my researches.

Merry Christmas all :)