I'm trying to install davmail,
I've already install JAVA manually (tar.gz file). After trying with the ppa:webupd8team repo and not having good results. Had to clean a lot of files packages and so on.
Anyhow when trying to install davmail I'm getting this error

$ sudo dpkg -i davmail_4.4.1-2225-1_all.deb
Selecting previously unselected package davmail.
(Reading database ... 174785 files and directories currently installed.)
Preparing to unpack davmail_4.4.1-2225-1_all.deb ...
Unpacking davmail (4.4.1-2225-1) ...
dpkg: dependency problems prevent configuration of davmail:
 davmail depends on openjdk-7-jre | openjdk-6-jre | oracle-java7-jre | sun-java6-jre; however:
  Package openjdk-7-jre is not installed.
  Package openjdk-6-jre is not installed.
  Package oracle-java7-jre is not installed.
  Package sun-java6-jre is not installed.

dpkg: error processing package davmail (--install):
 dependency problems - leaving unconfigured
Processing triggers for gnome-menus (3.10.1-0ubuntu2) ...
Processing triggers for desktop-file-utils (0.22-1ubuntu1) ...
Processing triggers for bamfdaemon (0.5.1+14.04.20140409-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for mime-support (3.54ubuntu1) ...
Errors were encountered while processing:

And JAVA is configured

$ java -version 
java version "1.7.0_55"
Java(TM) SE Runtime Environment (build 1.7.0_55-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.55-b03, mixed mode)

$ javac -version
javac 1.7.0_55

$ which java

$ echo $JAVA_HOME

Is there a way to tell davmail that we already have JAVA installed?
or a workaround for this problem?

The update-alternatives option is configured as well.

$ update-alternatives --list java

$ update-alternatives --display java
java - auto mode
  link currently points to /opt/java/jdk1.7.0_55/bin/java
/opt/java/jdk1.7.0_55/bin/java - priority 100
Current 'best' version is '/opt/java/jdk1.7.0_55/bin/java'.

$ update-alternatives --config java
There is only one alternative in link group java (providing /usr/bin/java): /opt/java/jdk1.7.0_55/bin/java
Nothing to configure.

This is a quick and dirty solution, but you can tell dpkg not to check that dependencies are installed using the --force-depends option.

# This will install davmail regardless of of whether or not its dependencies
# are installed
sudo dpkg -i --force-depends davmail_4.4.1-2225-1_all.deb

Note that there is a warning in the manpage for this option :

   --force-things, --no-force-things, --refuse-things

          Force  or  refuse  (no-force and refuse mean the same thing) 
          to do some things. things is a comma separated list of
          things specified below. --force-help displays a message
          describing them.  Things marked  with  (*)  are  forced  by

          Warning: These options are mostly intended to be used by 
          experts only. Using them without fully understanding their
          effects may break your whole system.

          depends: Turn all dependency problems into warnings.

Although it is not necessary to solve your immediate issue, note that when installing Java manually, if you goal is to install the "official" Oracle distribution of Java, you should use make-jpkg to turn the Oracle tar.gz archive into a .deb package (See this Debian wiki page for more information) :

make-jpkg jre-7u55-linux-x64.tar.gz
sudo dpkg -i oracle-java7-jre_7u55_amd64.deb

This allows the Java package to register with the Debian alternative system and let the system know you have a Java Environment installed and avoid dependency problems when installing packages that depend on Java.

  • I've already have update-alternatives configured, I also do like the option of building the package so I'm going to give it a try. – JAT2007 May 15 '14 at 14:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.