LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-01-2011, 07:07 AM   #1
Worp8d
LQ Newbie
 
Registered: May 2011
Distribution: Ubuntu 11.04
Posts: 4

Rep: Reputation: 0
Preventing package installation in Ubuntu 11.04


I'm in the process of installing the usual Python/Numpy/Scipy/Matplotlib combination. I'm using the installed version of Python (2.7) on Ubuntu 11.04 but I've compiled Numpy and Scipy (and ATLAS/LAPACK etc.) from source. I now want to install matplotlib from the repositories but every time I do python-numpy is installed as a dependency of python-matplotlib. I've tried "apt-get hold python-numpy" etc. and also locking the version of each package in synaptic but both synaptic and apt-get will happily install the packages when requested, I assume because hold/lock version don't work on packages that aren't yet installed.

How can I prevent these packages being installed? Or is there a way to tell Ubuntu that I already have versions?
 
Old 05-01-2011, 07:36 AM   #2
winning
Member
 
Registered: Apr 2011
Posts: 70

Rep: Reputation: 13
Perhaps you could download the deb package for python-matplotlib and install it via dpkg. You could also build your own packages for numpy / scipy / etc.; install those and then simply use synaptic / aptitude / whatever to install python-matplotlib directly.
 
1 members found this post helpful.
Old 05-01-2011, 07:43 AM   #3
k3lt01
Senior Member
 
Registered: Feb 2011
Location: Australia
Distribution: Debian Wheezy, Jessie, Sid/Experimental, playing with LFS.
Posts: 2,900

Rep: Reputation: 636Reputation: 636Reputation: 636Reputation: 636Reputation: 636Reputation: 636
You can lock out packages that are not installed in synaptic. I just did it in Debian to make sure so if Ubuntu still has synaptic easily accessible all you need to do is highlight the package(s) you don't want installed go to Package > Lock Version and it will place a lock on it.
 
Old 05-01-2011, 10:20 PM   #4
Worp8d
LQ Newbie
 
Registered: May 2011
Distribution: Ubuntu 11.04
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by k3lt01 View Post
You can lock out packages that are not installed in synaptic. I just did it in Debian to make sure so if Ubuntu still has synaptic easily accessible all you need to do is highlight the package(s) you don't want installed go to Package > Lock Version and it will place a lock on it.
I just tried this again - I locked both dependencies of python-numpy using both aptitude and synaptic. I then requested a python-numpy install through synaptic and both of the dependencies were installed. I don't know if this is a problem just with my ditro?
 
Old 05-01-2011, 10:45 PM   #5
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,131
Blog Entries: 2

Rep: Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833
In systems running the apt package management the correct way to install software is always using the package management. If you need to compile software from source then take the time to make a .deb-package from it and then install that package. This way you don't run into those dependency problems.
You can learn a lot about packaging from the Debian maintainer's guide.
 
Old 05-01-2011, 10:49 PM   #6
k3lt01
Senior Member
 
Registered: Feb 2011
Location: Australia
Distribution: Debian Wheezy, Jessie, Sid/Experimental, playing with LFS.
Posts: 2,900

Rep: Reputation: 636Reputation: 636Reputation: 636Reputation: 636Reputation: 636Reputation: 636
Quote:
Originally Posted by Worp8d View Post
I just tried this again - I locked both dependencies of python-numpy using both aptitude and synaptic. I then requested a python-numpy install through synaptic and both of the dependencies were installed. I don't know if this is a problem just with my ditro?
Sorry I thought you didn't want python-numpy to install as you wanted to do that from source? Just trying to get an accurate picture here so could you list exactly what you want to lock out and what you want apt/aptitude/synaptic to install.
 
Old 05-02-2011, 12:41 AM   #7
Worp8d
LQ Newbie
 
Registered: May 2011
Distribution: Ubuntu 11.04
Posts: 4

Original Poster
Rep: Reputation: 0
No worries.

I've got python from repos. I want to install python-numpy, python-scipy and python-matplotlib. python-numpy and python-scipy I have compiled from source for speed, python-matplotlib I don't care about.

python-matplotlib depends on python-numpy which in turn depends on libblas3gf (BLAS library) and liblapack3gf (LAPACK library). I have compiled all three of these dependencies from source and installed them to $HOME/local/[lib|include|bin] using the install scripts provided with the sources.

Now I want to install matplotlib from the repos so I lock out the above three packages with
Code:
sudo aptitude hold python-numpy libblas3gf liblapack3gf
. When I
Code:
sudo apt-get install python-matplotlib
all of the (above) dependencies are installed with it. I've tried locking out the packages in synaptic, both with and without simultaneous aptitude hold, to no avail.

I realise I could just compile matplotlib from source and everything would be fine but I use plenty of other programs which also use those packages (and hence have the above three dependencies) and I don't want to have to install everything from source.

I'm trying to work out how to create a .deb package from the sources I have but I haven't had much time to have a good go at it.

Thanks for the help!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Ubuntu TIP: Automating Package Installation apt-get to the rescue LXer Syndicated Linux News 0 11-27-2008 07:50 PM
Preventing a Package from being Upgraded neoAKiRAz Ubuntu 3 04-25-2007 07:51 PM
Preventing aptitude installing a package that I have built manually Simon Fisher Debian 3 06-30-2006 05:48 AM
Preventing Automount for USB Devices on Ubuntu phyx Linux - Newbie 2 02-13-2006 07:01 PM
sysv-rc error preventing package installations - help... yekibud Linux - General 2 04-22-2005 02:39 AM


All times are GMT -5. The time now is 04:42 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration