apt

How do you run `apt-get` in a dockerfile behind a proxy?

≡放荡痞女 提交于 2019-11-28 15:42:32
I am running a virtual machine (Ubuntu 13.10) with docker (version 0.8.1, build a1598d1). I am trying to build an image with a dockerfile. First, I want to update the packages (using the code below - the proxy is obfuscated) but apt-get times out with the error: Could not resolve 'archive.ubuntu.com' . FROM ubuntu:13.10 ENV HTTP_PROXY <HTTP_PROXY> ENV HTTPS_PROXY <HTTPS_PROXY> RUN export http_proxy=$HTTP_PROXY RUN export https_proxy=$HTTPS_PROXY RUN apt-get update && apt-get upgrade I have also run the following in the host system: sudo HTTP_PROXY=http://<PROXY_DETAILS>/ docker -d & The host

ubuntu16.04安装mysql5.6

岁酱吖の 提交于 2019-11-28 15:01:29
ubuntu16.04安装mysql5.6 apt-get install software-properties-common sudo add-apt-repository 'deb http://archive.ubuntu.com/ubuntu trusty universe' sudo apt-get update sudo apt install mysql-server-5.6 sudo apt install mysql-client-5.6 Ubuntu16.04完全卸载Mysql 5.7 sudo apt purge mysql-* sudo rm -rf /etc/mysql/ /var/lib/mysql sudo apt autoremove sudo apt autoreclean apt-get install software-properties-common sudo add-apt-repository 'deb http://archive.ubuntu.com/ubuntu trusty universe' sudo apt-get update sudo apt install mysql-server-5.6 sudo apt install mysql-client-5.6 Ubuntu16.04完全卸载Mysql 5.7 sudo

apt-get: command not found

99封情书 提交于 2019-11-28 14:58:42
问题 I'm trying to install an apache server on my AWS instance, however, it seems that it doesn't have the apt package installed. I googled and all I found was some broken links to this package. I am using Putty on a windows machine if that information helps. I currently have low to none experience in linux enviroments. I am running the following version of Linux Linux ip-172-31-37-96 3.14.48-33.39.amzn1.x86_64 #1 SMP Tue Jul 14 23:43:07 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux Can anyone help with

What is the difference/usage of homebrew, macports or other package installation tools? [closed]

纵然是瞬间 提交于 2019-11-28 13:13:12
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . I've just recently switched to a Mac from Ubuntu. I was disappointed that mac doesn't have the convenient sudo apt-get in Ubuntu. I've heard that I should use homebrew but I'm not exactly sure what homebrew or macports does? 回答1: MacPorts is the way to go. Like @user475443 pointed, MacPorts has many many more

神器Termux

99封情书 提交于 2019-11-28 07:21:59
文章来源:企鹅号 - 一件风衣 (一)——如何用安卓手机优雅地写Python 一款很牛逼的神器——Termux。 一、关于Termux (一)特性 1.类型 这是一款大小只有几百K的apk,安装后可以在Android手机上搭建一个完整的Linux环境。 2.工作方式 命令行,乍看之下很不友好,实则提供了很多隐藏的功能,实际上手之后非常好用。 3.关于软件源 Termux有官方的软件源,网速挺快,与Linux软件源保持同步。 4.关于root 无需root!无需root!无需root!不需要root权限Termux就可以正常运行,不过需求多的用户能root自然是最好了,很多需要root权限的命令就可以执行了,包括文件管理上也会很方便。 5.可拓展性 很强,挖个坑,以后介绍。 (二)安装与配置 我的设备:OnePlus6,系统Android 8.1.0 1.安装 推荐在官方途径下载,这里放上官网: https://termux.com 你也可以直接百度搜索Termux,请自行辨别备选链接。 官网提供了两种下载方式,Google Play不会翻墙或者手机Google框架不完整的话还是不要使用了,强烈建议选择在F-Droid(也是一个软件商店,不过很干净)搜索下载,选择“Termux Terminal emulator with packages”,当前版本是0.60,更新于四个月前

debian apt packages hash sum mismatch

旧时模样 提交于 2019-11-28 04:40:10
From the Debian command line, I'm getting a hash sum mismatch after executing aptitude update; aptitude upgrade . Below is the command line output. I've tried an aptitude clean , but this does not seem to help. I've also done a few google searches, but nothing seems to help. I've been getting the mismatch error for a few days. Any help is appreciated. Resolving dependencies... open: 405; closed: 880; defer: 58; conflict: 78. The following packages will be upgraded: apache2.2-bin apt-utils aptdaemon aptdaemon-data avahi-daemon bind9-host dnsutils ekiga gir1.2-cogl-1.0 gir1.2-coglpango-1.0

Ubuntu livecd系统定制

北城余情 提交于 2019-11-28 03:14:44
使用工具Cubic 一、安装 要安装Cubic,请添加PPA(个人软件包集),然后使用 apt 。 sudo apt-add-repository ppa:cubic-wizard/release sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 6494C6D6997C215E sudo apt update sudo apt install cubic 二、使用 2.1选择一个目录以保留所有项目文件 2.2选择使用镜像 2.3next 将显示提取压缩的Linux文件系统的进度 2.4进入系统的chroot环境(root用户) 可以安装你需要的软件,复制文件。 可以把文件或目录拖入终端窗口,将其复制到当前目录 2.5finish 在2.1选择的目录下可以找到打包好的.iso镜像 参考 https://chubuntu.com/questions/16157/how-to-use-cubic-to-create-a-custom-ubuntu-live-cd-image.html 来源: https://www.cnblogs.com/blackonwhite/p/11388309.html

Installing SciPy and NumPy using pip

允我心安 提交于 2019-11-28 02:50:30
I'm trying to create required libraries in a package I'm distributing. It requires both the SciPy and NumPy libraries. While developing, I installed both using apt-get install scipy which installed SciPy 0.9.0 and NumPy 1.5.1, and it worked fine. I would like to do the same using pip install - in order to be able to specify dependencies in a setup.py of my own package. The problem is, when I try: pip install 'numpy==1.5.1' it works fine. But then pip install 'scipy==0.9.0' fails miserably, with raise self.notfounderror(self.notfounderror.__doc__) numpy.distutils.system_info.BlasNotFoundError:

Ubuntu Server : 自动更新

試著忘記壹切 提交于 2019-11-28 02:43:15
Ubuntu(16.04/18.04) 默认会每天自动安装系统的安全更新,但是不会自动安装包的更新。本文梳理 Ubuntu 16.04/18.04 系统的自动更新机制,并介绍如何配置系统自动更新所有的包。说明:简单起见,本文中使用 Ubuntu 指代 Ubuntu 16.04/18.04。 系统需要更新 当我们远程登录系统时,会收到如下图所示的更新相关的消息: 红框中的第一行文字说明系统中有 149 个包需要更新。第二行说明没有安全相关的包需要更新。之所以会这样,是因为 Ubuntu 默认的配置会每天自动安装安全更新而忽略其它包的更新。接下来我们就介绍 Ubuntu 中的自动更新机制。 通过定时任务执行更新 Ubuntu 默认定义了 4 个 systemd unit 执行更新任务,它们分别是: /lib/systemd/system/apt-daily-upgrade.service /lib/systemd/system/apt-daily-upgrade.timer /lib/systemd/system/apt-daily.service /lib/systemd/system/apt-daily.timer 其中的 apt-daily.timer 和 apt-daily-upgrade.timer 是两个触发器,分别在每天指定的时间触发 apt-daily.service

ubuntu 禁止内核更新

戏子无情 提交于 2019-11-28 01:40:50
1. 今天使用ubuntu 发现一直在登录界面循环,查资料表明:在使用apt 更新后,会导致内核更新,最终导致内核和驱动不匹配 2. 在解决上述问题之后,查看使用内核 1 sudo dpkg --get-selections | grep linux 3. 查看是正在使用内核 1 uname -a 4. 禁止内核更新 1 sudo apt-mark hold linux-image-4.4.0-21-generic 2 sudo apt-mark hold linux-image-extra-4.4.0-21-generic 5. 重启内核更新 1 sudo apt-mark unhold linux-image-4.4.0-21-generic 2 sudo apt-mark unhold linux-image-extra-4.4.0-21-generic 来源: https://www.cnblogs.com/zxj9487/p/11386227.html