转自:https://askubuntu.com/questions/769467/can-not-install-openjdk-9-jdk-because-it-tries-to-overwrite-file-aready-includ

  1. Normally try to install the openjdk-9-jdk package, preferably using the package manager apt:

    sudo apt install openjdk-9-jdk

    This will install all of its dependencies and also download the binary package file. It should be stored at /var/cache/apt/archives/openjdk-9-jdk_9~b114-0ubuntu1_amd64.deb now, but the file name's second half may differ in case you're having a different version.

    Please note that we expect this single command to fail with the error message described in the question. Ignore the error, we'll take care of that in the next steps.

  2. The dependency packages were not fully configured yet because the installation of openjdk-9-jdk failed and got aborted. We have to do that manually now and simply trigger the configuration of all not yet configured packages:

    sudo dpkg --configure -a
  3. Finally we install our openjdk-9-jdk package. Therefore we use the downloaded and cached binary package file we got in step 1. We have to add the --force-overwrite flag to make the package manager ignore our doubly provided file and quietly overwrite it.

    sudo dpkg -i --force-overwrite '/var/cache/apt/archives/openjdk-9-jdk_9~b114-0ubuntu1_amd64.deb'

    You may have to adapt the file name in case you're having a different version, or just use tab-completion to enter the file name: press Tab after having entered the file name up to the underscore (...openjdk-9-jdk_) and it should autocomplete the correct file name.

ubuntu 16.04 安装jdk9错误的更多相关文章

  1. Ubuntu 16.04安装QQ国际版图文详细教程

            因工作需要,我安装了Ubuntu 16.04,但是工作上的很多事情需要QQ联系,然而在Ubuntu上的WebQQ很是不好用,于是在网上搜索了好多个Linux版本的QQ,然而不是功能不全 ...

  2. Ubuntu 16.04 安装Mysql 5.7 踩坑小记

    title:Ubuntu 16.04 安装Mysql 5.7 踩坑小记 date: 2018.02.03 安装mysql sudo apt-get install mysql-server mysql ...

  3. Ubuntu 16.04安装JDK(转载)

    1.简单的安装方法 安装JDK的最简单方法应该就是使用apt-get来安装了,但是源一般是OpenJDK,如果需要安装Oracle的JDK这种方法就不合适了,直接跳过看下面的章节. 1.使用ctrl+ ...

  4. ubuntu 16.04 安装Tensorflow

    ubuntu 16.04 安装Tensorflow(CPU) 安装python ubuntu 16.04自带python2.7,因此可以略过这一步 安装pip sudo apt-get install ...

  5. Ubuntu 16.04 安装和配置 Redis

    因为发现之前手动安装的 redis 与现有的教程不一样,所以总结统一一下安装的标准步骤. 安装依赖项 为了获取最新版本的 Redis,我们将从源代码进行编译和安装.下载源代码之前,需要先安装一些编译所 ...

  6. Ubuntu 16.04安装cuda7.5 GCC

    http://www.linuxidc.com/Linux/2017-01/139320.htm 在介绍Ubuntu 16.04安装 CUDA7.5开始前,先辨析几个概念GPU.NVIDIA.NVID ...

  7. Ubuntu 16.04 安装opencv的各种方法(含opencv contrib扩展包安装方法)

    Ubuntu 16.04 安装opencv的各种方法(含opencv contrib扩展包安装方法) https://blog.csdn.net/ksws0292756/article/details ...

  8. ubuntu 16.04 安装 Matlab R2016b后启动出现的问题

    (1)报以下错误: License checkout failed.License Manager Error -95MATLAB is unable to connect to the licens ...

  9. Ubuntu 16.04安装Memcached(单机)

    Ubuntu 16.04安装Memcached,不过不仅限与Ubuntu,可以用CentOS等去安装,只不过测试时使用的是Ubuntu机器.Windows下不建议使用,本机调试可以使用,线上环境除了W ...

随机推荐

  1. 理解golang中的channel

    channel是goroutine之间的通信机制.可以类比线程间的通信,线程间的通信有多种方式,比如线程上下文.共享内存.IPC通信.socket实现不同机器间的通信. channel用起来很简单,绑 ...

  2. C指针(3)——指向指针的指针(程序讲解)

    int **q可以分成两部分,即int* 和 (*q),后面的 “q” 中的* 表示q是一个指针变量,前面的int*表示指针变量q只能存放int*型变量的地址.int** q表示为指针变量q只能存放i ...

  3. python--模块之基本

    模块的概念: 在计算机程序开发过程中,随着程序代码越来越多,在一个文件里代码就会越来越长,不利于维护.为了编写可维护的代码,我们把很多函数分组,分别放到不同的文件里,这样每个文件包含的代码就相对较少. ...

  4. JS代码优化及技巧

    案例一  对象参数独立化 情景:为多个日期文本框添加日期选择器 源代码: $('#PropertySalesAdviceExchnagedDate1').datepicker({ showOn: 'b ...

  5. android学习十 ActionBar

    1.api level大于等于11 支持,或者使用兼容库,但兼容库的问题很多. 2.一个操作栏属于一个活动,并具有其生命周期 3.操作栏分3类:a.选项卡操作栏,b.列表操作栏,c.标准操作栏 4.获 ...

  6. Qt-QML-自定义个自己的文本Text

    好久都没有正经的更新自己的文章了,这段时间也辞职了,听了小爱的,准备买个碗,自己当老板,下面请欣赏效果图 这个界面布局就是自己是在想不到啥了,按照常规汽车导航的布局布局了一下,主要看内容哈,看看这个文 ...

  7. git基础(1)

    一.获取git仓库(两种方法)1.现有目录初始化 git init目录有文件(非空文件)进行跟踪执行:git add+文件名提交:git commit -m(提交信息说明) 2.克隆现有代码仓库的代码 ...

  8. 怎样用Eclipse将Java源代码生成可执行文件[转]

    eclipse将java源代码生成jar可执行文件 用eclipse做了一个web项目的自动化测试,自己用的时候倒是很方便,打开eclipse直接运行即可,但是分享给其他小伙伴用的时候就不太方便,希望 ...

  9. 韦大仙--Katalon---一款好用的selenium自动化测试插件

    selenium框架是目前使用较广泛的开源自动化框架,一款好的.基于界面的录制工具对于初学者来说可以快速入门:对于老手来说可以提高开发自动化脚本的效率.我们知道Selenium IDE是一款使用较多的 ...

  10. 【转】Bootstrap FileInput中文API整理

    Bootstrap FileInput中文API整理 这段时间做项目用到bootstrap fileinput插件上传文件,在用的过程中,网上能查到的api都不是很全,所以想着整理一份比较详细的文档, ...