简体   繁体   中英

Sametime install on ubuntu giving error

I am using

sudo apt-get install sametime-connect

and getting

Reading package lists... Done
Building dependency tree       
Reading state information... Done
sametime-connect:i386 is already the newest version.
The following packages were automatically installed and are no longer required:
  linux-headers-4.4.0-31 linux-headers-4.4.0-31-generic
  linux-image-4.4.0-31-generic linux-image-extra-4.4.0-31-generic
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 52 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 jenkins (2.71) ...
Found an incorrect Java version
Java version found:
java version "1.7.0_131"
OpenJDK Runtime Environment (IcedTea 2.6.9) (7u131-2.6.9-0ubuntu0.14.04.2)
OpenJDK 64-Bit Server VM (build 24.131-b00, mixed mode)

Aborting
invoke-rc.d: initscript jenkins, action "start" failed.
dpkg: error processing package jenkins (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 jenkins
E: Sub-process /usr/bin/dpkg returned an error code (1)

I have .deb file locally , i am using ubuntu14.04 64 bit. can anyone provide help in this area,Thanks in advance.

The problem seems to be with Jenkins: the version you installed is incompatible with java 1.7.0_131. Every time you use apt-get to install another package, it complains that jenkins installation is broken.

I am going to assume you are running a linux distribution like Ubuntu 14.04. If this is the case, you should be able to fix the issue by doing the following:

sudo add-apt-repository ppa:openjdk-r/ppa
sudo apt-get update
sudo apt-get install openjdk-8-jdk

Then you need to change the default version of java with:

update-java-alternatives --list
sudo update-java-alternatives --set /path/to/java-8

For example:

sudo update-java-alternatives --set /usr/lib/jvm/java-1.8.0-openjdk-amd64

Now you can run:

sudo apt-get upgrade

Now jenkins should upgrade/install correctly. After this, apt should work again without errors/complaints.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM