apt-get

Linux

ぐ巨炮叔叔 提交于 2019-12-13 11:45:43
一、 通用命令 1、date :打印或者设置系统的日期和时间 2、 stty -a:可以查看或者打印控制字符(Ctrl-C、Ctrl-D、 Ctrl-Z等) 3、 passwd:用passwd -h查看 4、logout,login: 登录shell的登录和注销命令 5、 more, less, head tail: 显示或部分显示文件内容 6、 lp/lpstat/cancel, lpr/lpq/lprm: 打印文件 7、 chmod u+x:更改文件权限 8、 rm -fr dir:删除非空目录 9、cp -R dir:拷贝目录 10、 fg jobid :可以将一个后台进程放到前台 11、 kill 的作用: send a signal to a process、 eg: kill -9 发送的是SIG_KILL信号,具体发送什么信号 可以通过 man kill 查看、 12、 ps 的用法, ps -e 或 ps -o pid,ppid,session,tpgid, comm (其中session显示的sessionid, tpgid显示前台进程组id, comm显示命令名称) 二 、ubuntu常用命令: 1、 dpkg: package manager for Debian   * 安装: dpkg -i package   * 卸载: dpkg -r package

Install Ubuntu equivalent libraries in Macos e.g libssl-dev

耗尽温柔 提交于 2019-12-13 09:52:06
问题 I would like to install ubuntu libraries listed below in macos. Please does anyone know what the equivalent commands in macos terminal are? I have searched homebrew already and they don't exist there. apt-get install -y build-essential libssl-dev libnet-ssleay-perl libcrypt-ssleay-perl libidn11-dev Any pointers in the right direction will be highly appreciated. 回答1: There’s no equivalent to build-essential on macOS because those basic tools are already installed. libssl-dev is OpenSSL: brew

how can a feed a file list into dpkg --get?

一曲冷凌霜 提交于 2019-12-13 05:24:47
问题 I can use dpkg --get-selections | grep -v deinstall | cut -f 1 | tr '\n' ' ' > listpackages.txt to fill a file with all my installed packages. Is there a to install using dpkg or apt and reference the listpackages.txt file created above? I want to be able to backup what I have installed as a package list, reinstall my distro and finally in one command install everything I had installed on the previous version. -thanks u2! 回答1: apt-get install `cat listpackages.txt` 回答2: Use the --set

Docker build Input/Output error

主宰稳场 提交于 2019-12-13 01:43:08
问题 I am quite new to docker, so I am sure i have made some silly mistake. I am trying to use docker to set up an environment with my required libraries and dependencies installed for c++. However, I can't seem to get the VM built. I am running on OSX Yosemite, and my installation process was as follows: $ brew cask install virtualbox $ brew install docker-machine $ docker-machine create --driver virtualbox default $ eval "$(docker-machine env default)" I have been able to successfully run a few

玩坏Docker(六)笔记:RUN vs CMD vs ENTRYPOINT

筅森魡賤 提交于 2019-12-13 01:10:06
RUN、CMD 和 ENTRYPOINT 这三个 Dockerfile 指令看上去很类似,很容易混淆。本节将通过实践详细讨论它们的区别。 简单的说: RUN 执行命令并创建新的镜像层,RUN 经常用于安装软件包。 CMD 设置容器启动后默认执行的命令及其参数,但 CMD 能够被 docker run 后面跟的命令行参数替换。 ENTRYPOINT 配置容器启动时运行的命令。 下面我们详细分析。 Shell 和 Exec 格式 我们可用两种方式指定 RUN、CMD 和 ENTRYPOINT 要运行的命令:Shell 格式和 Exec 格式,二者在使用上有细微的区别。 Shell 格式 例如: RUN apt-get install python3 CMD echo “Hello world” ENTRYPOINT echo “Hello world” 当指令执行时,shell 格式底层会调用 /bin/sh -c 。 例如下面的 Dockerfile 片段: ENV name Cloud Man ENTRYPOINT echo “Hello, $name” 执行 docker run 将输出: Hello, Cloud Man 注意环境变量 name 已经被值 Cloud Man 替换。 下面来看 Exec 格式。 Exec 格式 [“executable”, “param1”,

Repair damaged Python3.2 installation (Ubuntu)

 ̄綄美尐妖づ 提交于 2019-12-12 20:56:08
问题 I stupidly remove the subprocess.py module from /usr/lib/python3.2 so I try to fix this with executing: sudo apt-get install python3 but I just got this error: Traceback (most recent call last): File "/usr/bin/py3compile", line 33, in from subprocess import PIPE, Popen ImportError: No module named subprocess dpkg: error processing python3 (--configure): subprocess installed post-installation script returned error exit status 1 dpkg: dependency problems prevent configuration of python3-gobject

A new job in Travis-CI cannot get curl library

旧城冷巷雨未停 提交于 2019-12-12 17:21:07
问题 I have configured Travis-CI with many apt-get, and it worked perfect. But since this week, the apt-get fails and some libraries cannot be retrieved. I have not changed the code. How can I solve this problem: The library in question is curl. Working job (4 days ago): https://travis-ci.org/angoca/db2unit/jobs/47121134 Current job failing: https://travis-ci.org/angoca/db2unit/jobs/47634811 The error I am facing is: $ sudo apt-get install aria2 curl -y Reading package lists... Done Building

apt-get install fails with Not Found error because package removed from repository

亡梦爱人 提交于 2019-12-12 17:09:13
问题 I've been attempting to install the package r-base on Ubuntu Trusty Tahr and there's a package dependency that became broken in the last week. My commands are as follows: apt-get update -y apt-get dist-upgrade -y apt-get install -y r-base-dev ... Err http://archive.ubuntu.com/ubuntu/ trusty-security/main libpng12-dev amd64 1.2.50-1ubuntu2.14.04.1 404 Not Found [IP: 91.189.91.23 80] Fetched 92.8 MB in 28s (3262 kB/s) E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/libp/libpng

Linux内核编译、安装流程

蓝咒 提交于 2019-12-12 17:02:09
原文链接:https://blog.csdn.net/qq_28437139/article/details/83692907 此处只讲linux内核编译步骤至于安装虚拟机,安装ubuntu操作系统请自行百度 环境信息: Linux操作系统:ubuntu16.04 内核版本:4.15.0-29-generic 需要编译和安装的内核源码版本:4.19 第一步:下载linux内核源码 官网地址地址: https://www.kernel.org/ 官网大致是这个样子,大家关注我标出的位置就OK了 第一列: mainline当前在开发的内核新版本 stable 稳定的内核版本 longterm 长期维护的内核版本 第二列: 版本号以小数点分割 第一个位置主版本号一般有重大改变时会修改的版本号(具有里程碑意义) 第二个位置次版本号偶数代表稳定版本(可商用),奇数代表开发板不稳定(不可商用) 第三个位置这个号码代表当前版本修改次数(每次可能修改一些bug) 第三列: 当前版本最后一次修改代码时间 第四列: tarball:完整的代码 pgp:验证签名 patch:基于上一个版本的补丁(一般商用的系统不会频繁的编译内核,所以可以打补丁上去方便) 在这里我们点击tarball下载完整代码 第二步:上传代码解压,安装软件 登录ubuntu16.04 切换到root权限:su - root