dpkg

把ubuntu自带的高gcc版本降到低版本(如gcc 3.4)的方法

 ̄綄美尐妖づ 提交于 2019-12-16 13:36:41
转载自: 博客1 、 博客2 、 博客3 步骤 第一步: 下载所需gcc安装包(.deb格式) 手动:老版本gcc下载地址:http://old-releases.ubuntu.com/ubuntu/pool/universe/g/ ; http://archive.ubuntu.com/ubuntu/pool/universe/g/ 自动:wget http://old-releases.ubuntu.com/ubuntu/pool/universe/g/gcc-版本号/版本号.deb 备注:使用wget自动下载时,可能出现中断,需要重新下载。重新下载时,下载的文件命名时会自动追加(1)。使得,dpkg时找不到重新下载的文件。需要手动更改文件名。 第二步: dpkg下载的安装包。 第三步: dpkg后,如果没有显示降级,可以手动设置优先级,如下: $sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.4 40 (这里“40”是优先级,值越大优先级越高) $sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 60 (本机自带的设置为60更高的优先级) 举例 以gcc3.4为例依次执行如下命令即可(下载安装前面5个即可

yum和apt-get有什么区别

二次信任 提交于 2019-12-16 11:04:31
一般来说著名的linux系统基本上分两大类: 1.RedHat系列:Redhat、Centos、Fedora等 2.Debian系列:Debian、Ubuntu等 RedHat 系列 1 常见的安装包格式 rpm包,安装rpm包的命令是“rpm -参数” 2 包管理工具 yum 3 支持tar包 Debian系列 1 常见的安装包格式 deb包,安装deb包的命令是“dpkg -参数” 2 包管理工具 apt-get 3 支持tar包 tar 只是一种压缩文件格式,所以,它只是把文件压缩打包而已。 rpm 相当于windows中的安装文件,它会自动处理软件包之间的依赖关系。 优缺点来说,rpm一般都是预先编译好的文件,它可能已经绑定到某种CPU或者发行版上面了。 tar一般包括编译脚本,你可以在你的环境下编译,所以具有通用性。 如果你的包不想开放源代码,你可以制作成rpm,如果开源,用tar更方便了。 tar一般都是源码打包的软件,需要自己解包,然后进行安装三部曲,./configure, make, make install. 来安装软件。 rpm是redhat公司的一种软件包管理机制,直接通过rpm命令进行安装删除等操作,最大的优点是自己内部自动处理了各种软件包可能的依赖关系。 -------------------------------- *.rpm形式的二进制软件包

Installing Debian 8 packages & dependencies to a specified fs directory

て烟熏妆下的殇ゞ 提交于 2019-12-14 03:29:30
问题 I am new to Debian 8, and still very much a Linux beginner. I am currently running Debian 8 Oracle VM Virtualbox in Windows 10, for reference. For a project I am working on, my task is installing Debian 8 packages from the source package to a specified rootfs folder. After getting the source files (.tar.gz, .diff.gz, .dsc) and extracting them, I run: dpkg-source -x <package>.dsc Which extracts the source to the working directory. The issue I'm having is generating the .deb files from the

ubuntu的常规指令

无人久伴 提交于 2019-12-14 01:48:55
Linux之Ubuntu:Ubuntu中常使用的快捷键命令、操作集合、简单案例之详细攻略 原创 一个处女座的程序猿 发布于2018-04-02 20:12:22 阅读数 7588 收藏 展开 Linux之Ubuntu:Ubuntu中常使用的快捷键命令、操作集合、简单案例之详细攻略 目录 一、Ubuntu常使用的快捷键 0、Linux系统快捷键 二、终端命令常用快捷键 1、利用man、--help查找某个关键命令的功能 2、几个牛叉命令功能—apt-get、dpkg、make 3、基本命令的功能 4、其他系统相关命令功能 configure,make,make install用法 三、Ubuntu常使用的方法 四、Ubuntu常使用的简单案例 1、基本操作命令 2、实际命令—图文操作 3、Ubuntu下编辑、修改、保存sh文件 一、Ubuntu常使用的快捷键 参考博客 : https://blog.csdn.net/yzhan6_10/article/details/69569468 在Linux下Win键就是Super键,长按该键可以打开系统快捷键帮助说明。在Ubuntu中打开终端的快捷键是Ctrl+Alt+T,在终端中打开新的选项卡的快捷键是Ctrl+Shift+T。 0、Linux系统快捷键 Tab //自动补全命令或者文件名 Alt + F1 //聚焦到桌面左侧任务导航栏

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

Half installed packages and python circular dependency [closed]

眉间皱痕 提交于 2019-12-11 08:33:51
问题 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 6 years ago . Something went wrong while updating to ubuntu 12.04 to 12.10: root@ely:/sys/bus/usb/devices# dpkg -l | grep ^i[HUFW] iU libpython2.7 2.7.3-0ubuntu3.4 Shared Python runtime library (version 2.7) iU python 2.7.3-0ubuntu2.2 interactive high-level object-oriented language (default version) iU python-all 2.7.3

Dpkg: warning: files list file for package 'x'missing; assuming package has no files currently installed in Ubuntu 16.04

让人想犯罪 __ 提交于 2019-12-11 04:23:26
问题 I am using Ubuntu 16.04 with lubunut desktop environment. I had the following problem for more than 3 days when I do apt-get upgrade . I don't know what is problem means and how to solve. Note: 3 days before I try upgrade Linux-header-4.4.66, but it showed an error. I deleted it. Now, I'm back to Linux-header-4.4.64, which worked fine before. Error on sudo apt-get dist-upgrade (only last 15 line of 500+ line error): dpkg: warning: files list file for package 'libxcb-xkb1:amd64' missing;

What is alternative to -dpkg for Mac?

▼魔方 西西 提交于 2019-12-10 12:59:39
问题 I'm trying to use dpkg command but in Mac OS X it doesn't seem to work for me dpkg -scanpackages -m . /dev/null -->Packages -bash: dpkg: command not found dns:Administrator$ man dpkg No manual entry for dpkg I wonder how can I use the dpkg in Mac?? 回答1: Or homebrew http://mxcl.github.com/homebrew/ brew install dpkg The macports version has a lot of dependencies and takes forever. If all you want to do is see what is in the package then unar and untar it. ar -x package.deb You should then have

dpkg: warning: while removing directory /usr/local not empty so not removed

混江龙づ霸主 提交于 2019-12-10 12:48:43
问题 I built and installed a debian package from the following folder structure: myprog DEBIAN control usr local bin myprog.sh ... using the following commands: dpkg -b myprog/ myprog.deb && dpkg -i myprog.deb When i now remove the package by typing: dpkg -r myprog .. I got the following warning: dpkg: warning: while removing myprog, directory '/usr/local' not empty so not removed. As I think this is an every day scenario, how can I avoid the warning? Greets Thorsten! # Edit I tried to install the

UbuntuE: 无法获得锁 /var/lib/dpkg/lock-frontend - open (11: 资源暂时不可用) E: Unable to acquire the dpkg fronte

﹥>﹥吖頭↗ 提交于 2019-12-08 15:05:59
Ubuntu使用apt-get install 安装软件的时候,如果在未完成上一次下载的情况下将强行关闭命令行工具,再次使用apt-get install命令时可能会发生下面的提示: 无法获得锁 /var/lib/dpkg/lock - open (11: 资源暂时不可用) 无法锁定管理目录(/var/lib/dpkg/),是否有其他进程正占用它? 以下为亲测有效的两个方法: 1>终端输入 ps aux ,列出进程。找到含有apt-get的进程,直接sudo kill PID 但此方法我在使用的时候经常发现找不到正在使用apt的进程,或是在执行kill命令的时候无法找到该进程。因此推荐使用第二种方法 2>强制解锁,命令 sudo rm /var/cache/apt/archives/lock sudo rm /var/lib/dpkg/lock 来源: CSDN 作者: Yeecoder 链接: https://blog.csdn.net/qq_41629619/article/details/91467378