Ubuntu Precise - Install youtube-dl package using Quantal repo

Ubuntu Precise 12.04 currently contains in repository youtube-dl version 2012.02.27-1. As of recent YouTube changes this package version is not usable anymore but there is an updated version in Ubuntu Quantal 12.10 repository. To use it you need to perform couple of steps described below.

Used Ubuntu release:

$ lsb_release -d -r -c
Description: Ubuntu 12.04.1 LTS
Release: 12.04
Codename: precise

Update system packages and perform standard system upgrade operation:

$ sudo apt-get update
$ sudo apt-get upgrade

Verify that there is only youtube-dl 2012.02.27-1 version in repository:

$ apt-cache policy youtube-dl
youtube-dl:
Installed: 2012.02.27-1
Candidate: 2012.02.27-1
Version table:
*** 2012.02.27-1 0
500 http://pl.archive.ubuntu.com/ubuntu/ precise/universe amd64 Packages
100 /var/lib/dpkg/status

Define default release as Precise (12.04) as for now you (very likely) don't want to upgrade whole system using Quantal (12.10) repository so create file /etc/apt/apt.conf.d/00release with contents:

APT::Default-Release "precise";

Add Quantal repository to /etc/apt/sources.list:

deb http://pl.archive.ubuntu.com/ubuntu/ quantal universe

To upgrade youtube-dl package you need only universe component but if you plan to check out other packages later then you can add more components:

deb http://pl.archive.ubuntu.com/ubuntu/ quantal main restricted universe multiverse

Update package list:

$ sudo apt-get update

As you defined default release as Precise - there should not be any packages to update:

# sudo apt-get upgrade --simulate
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Verify that there is a new version of youtube-dl in package list:

$ sudo apt-cache policy youtube-dl
youtube-dl:
Installed: 2012.02.27-1
Candidate: 2012.02.27-1
Version table:
2012.09.27-1 0
500 http://pl.archive.ubuntu.com/ubuntu/ quantal/universe amd64 Packages
*** 2012.02.27-1 0
990 http://pl.archive.ubuntu.com/ubuntu/ precise/universe amd64 Packages
100 /var/lib/dpkg/status

Create a file /etc/apt/preferences.d/youtube-dl with contents:

Package: youtube-dl
Pin: release a=quantal
Pin-Priority: 990

APT will use youtube-dl package from Quantal repository unless the installed version is more recent.

$ apt-cache policy youtube-dl
youtube-dl:
Installed: 2012.02.27-1
Candidate: 2012.09.27-1
Package pin: 2012.09.27-1
Version table:
2012.09.27-1 990
500 http://pl.archive.ubuntu.com/ubuntu/ quantal/universe amd64 Packages
*** 2012.02.27-1 990
990 http://pl.archive.ubuntu.com/ubuntu/ precise/universe amd64 Packages
100 /var/lib/dpkg/status

Now the package is selected to be updated using Quantal repository:

# sudo apt-get -y upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be upgraded:
youtube-dl
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/50.2 kB of archives.
After this operation, 119 kB disk space will be freed.
(Reading database ... 347979 files and directories currently installed.)
Preparing to replace youtube-dl 2012.02.27-1 (using .../youtube-dl_2012.09.27-1_all.deb) ...
Unpacking replacement youtube-dl ...
Processing triggers for man-db ...
Setting up youtube-dl (2012.09.27-1) ...

To learn about package priorities and preference control file for APT read manual page:

$ man apt_preferences

Update - easier solution - use youtube-dl self update

Perform self update to the latest stable version:

$ sudo youtube-dl -U

I overlooked this solution but the first one could be useful for other packages.

Milosz Galazka

[转]Ubuntu Precise - Install youtube-dl package using Quantal repo的更多相关文章

  1. ubuntu下使用python3的有些库时,解决"raise ImportError(str(msg) + ', please install the python3-tk package') ImportError: No module named '_tkinter', please install the python3-tk package"的错误

    问题: 在Ubuntu下使用matplotlib这个库时,运行时出现如下错误: raise ImportError(str(msg) + ', please install the python3-t ...

  2. Ubuntu的Unable to locate package无法更新源问题解决方案

    https://blog.csdn.net/long19910605/article/details/47017889/ 问题: 更新源时提示不能联网(does the network require ...

  3. Ubuntu 查询 so 归属的 package

    . . . . . 今天 LZ 在运行一个程序的时候,出现找不到 so 库的情况: >$ ./core ./core: error : cannot open shared object fil ...

  4. ubuntu server install 安装中文(搜狗)输入法

    1.对于ubuntu server默认无中文输入法框架,我比较倾向于我一直使用的ibus-sunpinyin.这里我需要先安装ibus的框架 不过我遇到了问题: dpkg: dependency pr ...

  5. sudo apt install libreadline-dev Reading package lists... Error!

    luo@luo-ThinkPad-W540:~$ luo@luo-ThinkPad-W540:~$ luo@luo-ThinkPad-W540:~$ luo@luo-ThinkPad-W540:~$ ...

  6. AX7: Install a deployable package

    Table of Contents Introduction Key concepts Collect topology configuration data Generate a runbook f ...

  7. ubuntu apt-get install 时报错curl : Depends: libcurl4 (= 7.58.0-2ubuntu3.6) but 7.61.0-1ubuntu2 is to be installed或者 vim : Depends: vim-common (= 2:8.0.1453-1ubuntu1) but 2:8.0.1766-1ubuntu1 is to be ins

    ubuntu apt-get install 时报错:Depends: ***(=某版本)but***(另一版本)is to be installed 这时候就把这个***给purge后再重新装就好了 ...

  8. 在绘图的时候import matplotlib.pyplot as plt报错:ImportError: No module named '_tkinter', please install the python-tk package

    在绘图的时候import matplotlib.pyplot as plt报错:ImportError: No module named '_tkinter', please install the ...

  9. ImportError: No module named '_tkinter', please install the python3-tk package

    ImportError: No module named '_tkinter', please install the python3-tk package 先更新包,命令:sudo apt-get ...

随机推荐

  1. nio编程

    NIO主要有三大核心部分:Channel(通道),Buffer(缓冲区), Selector.传统IO基于字节流和字符流进行操作,而NIO基于Channel和Buffer(缓冲区)进行操作,数据总是从 ...

  2. stark组件开发之组合搜索基本显示

    数据的获取,上一篇,已经有了!然后就是,如何进行展示的问题.到了展示这里,又有了新的问题, 因为从数据库,取得的数据. 分为 queryset 和 tuple 两种数据结构.tuple 中,只是字符串 ...

  3. JavaSE基础知识(5)—面向对象(抽象类和接口)

    一.抽象类 1.理解 用abstract关键字定义的类,称为抽象类用abstract关键字定义的方法,称为抽象方法意义:当设计父类时,发现该父类根本不需要创建对象,并且里面有不好描述的方法.这个时候往 ...

  4. python 获取流文件 大小

    buffer_file_content=u"流文件内容" file_size = len(buffer_file_content)/ #kb

  5. 分割list,将集合按规定个数分为n个部分。

    /** * 按指定大小,分隔集合,将集合按规定个数分为n个部分 * * @param list * @param len * @return */ public static <T> Li ...

  6. 3D 数据

    1.3D 图 首先在进行 3D Plot 时除了导入 matplotlib ,还要额外添加一个模块,即 Axes 3D 3D 坐标轴显示: import numpy as np import matp ...

  7. Similarity measure

    1. https://blog.csdn.net/m0_37676632/article/details/68936157 2. https://www.cnblogs.com/pinard/p/62 ...

  8. .net webapi 接收 xml 格式数据的三种情况

    webapi 接收 xml 的三种方法 前段时间接到一个任务写一个小接口,要接收java端返回过来的短信xml数据. 刚拿到项目,我的第一想法是对方会以什么形式发送xml格式的数据给我呢,设想三种情况 ...

  9. 天然气管道Gaz[POI2007]

    --BZOJ1034 题目描述 Mary试图控制成都的天然气市场.专家已经标示出了最好的天然气井和中转站在成都的地图.现在需要将中转 站和天然气井连接起来.每个中转站必须被连接到正好一个钻油井,反之亦 ...

  10. EasyPR源码剖析(7):车牌判断之SVM

    前面的文章中我们主要介绍了车牌定位的相关技术,但是定位出来的相关区域可能并非是真实的车牌区域,EasyPR通过SVM支持向量机,一种机器学习算法来判定截取的图块是否是真的“车牌”,本节主要对相关的技术 ...