How to force debian squeeze to use libqt4-dev from debian wheezy without upgrading all packages to debian wheezy? - linux

I have a continuous integration server building some software that depends on a more recent version of libqt4-dev than the apt packages in debian squeeze provide. That version is available in debian wheezy. How can I tell apt to use libqt4-dev selectively from wheezy without upgrading all of the packages in my squeeze system to wheezy?

You can do this with apt's "preferences" functionality (man apt_preferences).
To add wheezy as a source of packages without installing anything from wheezy by default, add entries for wheezy to your sources.list, and add the following to /etc/apt/preferences (or to a file in preferences.d):
Package: *
Pin: release n=wheezy
Pin-Priority: 50
Once that is set up, you can install libqt4-dev with the following command:
apt-get install -t wheezy libqt4-dev
This will also install the dependencies of libqt4-dev, which may be numerous. Not being familiar with qt, I'm not sure whether the pinning solution here is the best way to get the newer version of qt onto a squeeze system. Another possibility is the backports repository, but I don't see qt4 in there. A third possibility is to build your own backported version using apt-get -b source.

Related

Yum cannot find the package I want to install

I am trying to a simple command sudo yum install SDL2. I know that this package exists as per the SDL website:
Red Hat-based systems (including Fedora) can simply do "sudo yum install SDL2" to get the library installed system-wide, or "sudo yum install SDL2-devel" to get headers and other build requirements ready for compiling your own SDL programs.
However, when I try to execute my command, I get the following:
Setting up Install Process
No package SDL2 available.
Error: Nothing to do
I am using Red Hat Enterprise Linux Server release 5.3 (Tikanga). How can I go about getting yum to locate this package?
ONLY SDL is available on redhat 5.3
uname -r
2.6.32-573.12.1.el6.centos.plus.x86_64
yum search sdl-devel --verbose
SDL-devel.x86_64 : Files needed to develop Simple DirectMedia Layer applications
Repo : base
With Fedora 26, SDL2 is available in repo fedora
uname -r
4.11.0-2.fc26.x86_64
dnf --disablerepo="*" --enablerepo="fedora" search sdl2-devel --verbose
SDL2-devel.x86_64 : Files needed to develop Simple DirectMedia Layer applications
Repo : fedora

Ubuntu: install latest version of package

I'm working with Ubuntu 14.04 and I need to use stress-ng.
If I type: apt-cache policy stress-ng
I obtain:
stress-ng:
Installed: 0.03.15-1~ubuntu14.04.1
Candidate: 0.03.15-1~ubuntu14.04.1
Version table:
*** 0.03.15-1~ubuntu14.04.1 0
100 http://mirror.switch.ch/ftp/mirror/ubuntu/ trusty-backports/universe amd64 Packages
100 /var/lib/dpkg/status
So if I run apt-get install stress-ng, it downloads version 0.03.15.
Unfortunately, this version does not allow me to do some things which are present in the last one, 0.07.16, supported by Ubuntu 17.04.
How can I do to use this latest version on 14.04?
You can add the repositories of the newer release to sources.list,and use apt-pinning,this is an advanced feature to install packages from a newer version of Ubuntu.
Check out Pinning.
Pinning is a process that allows you to remain on a stable release of
Ubuntu (or any other debian system) while grabbing packages from a
more recent version.
Note however that the processes described below will only work if
things like libc6 versions match, so you should probably not do this
on an Ubuntu system. I strongly recommend you look at UbuntuBackports
before doing this.
Also you can just download the package and make install.
Hope this helps.

Linux: How to install certain old version of a software via apt-get

I am trying to install the same versions of Apache, MySQL and PHP in my Linux PC (Raspberry Debian) as installed in my remote public server.
For instance, I'd like to install the last legacy release of the 2.2 branch, Apache/2.2.31.
apt-cache showpkg apache2
Output:
Package: apache2
Versions:
2.4.10-10+deb8u4 (/var/lib/apt/lists/mirrordirector.raspbian.org_raspbian_dists_jessie_main_binary-armhf_Packages)
But there isn't any information about the 2.2.31 version, neither in "Reverse Provides" section. I can do it by compiling from the sources, but it takes a lot of time. And I tried to find a reliable PPA or a reliable sources for deb packages, without any success.
How can I do it?
If APT tracks the specific version you are looking for, (like Kyle said) then it's pretty easy.
sudo apt-get install <pkg_name>=<pkg_version>
or
sudo apt-get -t=<target_version> <pkg_name>
To see which packages are tracked, run
apt-cache showpkg <package_name>
Unfortunately though, if a particular version is not managed by the APT, then you are out of luck using APT. It might be managed by some of the other package managers out there.
Ref. How can I downgrade a package via apt-get?
If you have the version number, or the target release, apt-get supports choosing a particular version or target release. More details can be found on manual page of apt-get. It can also be accessed from a terminal by typing man apt-get.
sudo apt-get install <package-name>=<package-version-number>
or
sudo apt-get -t=<target release> install <package-name>

Upgrading phpmyadmin (and other packages) on Debian Squeeze

I just setup a new VM with Debian Squeeze (latest stable release, 6.0.4). I am going for a webserver, so I installed the usual... apache, php5, mysql, phpmyadmin, etc.
Everything went well, everything is working.
My question is about upgrading packages. I noticed the phpmyadmin version is 3.3.7... the latest is 3.4.10.1. Doing apt-get update/upgrade does not upgrade the package.
How does one go about upgrading packages on a Debian Squeeze server if apt-get update/upgrade does not work?
Thanks!
You can download the latest version from the official page and follow the instrucctions inside the compress file for the installation.
Alternatively if you want to use the debian repositories, you can add
deb http://ftp.us.debian.org/debian testing main contrib non-free
in the file /etc/apt/source.list
Also add
Package: *
Pin: release n=testing
Pin-Priority: 500
in /etc/apt/preferences
doing this you will have all the packages for the testing version, but they're not going to be installed unless you specify it, so run
apt-get update
apt-get install <package name>=<version>
for example
apt-get install phpmyadmin=3.4.10.1-1
you can check the different versions with
apt-cache showpkg phpmyadmin

need help installing pecl on centos 5.8

So basically I'm trying to install APC, but I can't get pecl to work on Centos 5.8 i686
I have the latest stable releases of php-fpm, mysql, and nginx. Everything is working at 100%, everything is smooth. I'm running a live website with no problems. I just can't pecl to work.
yum install php-pear:
Most of the packages I'm trying to instal have dependency issues with php-common (whatever that is).
php-common = 5.1.6-32.el5 is needed
Much help is appreciated!
/usr/bin/pecl is available from php-pear package.
The dependency failures you got are stange. Probably because you have mixed installation of php-* 5.1 RPMs and php53-* 5.3 RPMs and get conflicts on devel files. You should do some clean up to keep only one set of RPMs for your target version, either 5.1 or 5.3.
You also have to install gcc, httpd-devel, php(53)-devel and finally php-pear to get phpize working.
Then you should be able to run pecl install apc
First of all assure you have your distro updated, you can do it with
yum update
Then check if you are not using any third-party repo, that contains this packages.
If you can, remove all the php packages with
yum remove php*
and try to install them again.
If you can't solve it, try the Fedora EPEL repositories which provides some updated packages.
All the commands needs be run by root.

Resources