Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Something appears to have gone awry on my dev server here on my home network. No matter what I try to install, apt-get always fails:
Code:
debian2:/home# apt-get install netselect
Reading package lists... Done
Building dependency tree... Done
Package netselect is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package netselect has no installation candidate
debian2:/home# apt-get install php5
Reading package lists... Done
Building dependency tree... Done
Package php5 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package php5 has no installation candidate
It doesn't matter what it is that I try to install, NOTHING will install. I had originally used this tutorial to do the 'perfect etch setup'. It has been working fine for months now and I had some problems today trying to get some PHP stuff to run so I uninstalled apache and php and was trying to reinstall.
I have Debian etch installed:
Code:
debian2:/home# uname -a
Linux debian2.home.jaith.net 2.6.18-6-486 #1 Tue Jun 17 20:57:16 UTC 2008 i686 GNU/Linux
I figured something might be wrong with my sources.list file so here it is:
Code:
#
# deb cdrom:[Debian GNU/Linux 4.0 r2 _etch_ - Official i386 NETINST Binary-1 20080103-00:44]/ lenny contrib main
#deb cdrom:[Debian GNU/Linux 4.0 r2 _etch_ - Official i386 NETINST Binary-1 20080103-00:44]/ lenny contrib main
deb http://ftp.us.debian.org/debian/ etch main
deb-src http://ftp.us.debian.org/debian/ etch main
deb http://security.debian.org/ etch/updates main contrib
deb-src http://security.debian.org/ etch/updates main contrib
I have even tried changing my sources.list to reference lenny instead of etch but it doesn't even upgrade the dist.
Take a look at this thread in the Debian forum. Debian users have been posting their sources here for a while.
Another thing is, if you use aptitude instead of apt-get, it might work better and work faster.
I have tried nearly half of those debian source list options and nothing seems to help. I run apt-get update every time and still I get something like this:
Code:
debian2:/# apt-get install php-pear
Reading package lists... Done
Building dependency tree... Done
Package php-pear is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package php-pear has no installation candidate
I have had a bit of luck with aptitude but it crashes when i try to install php-gd. Also, it is a REAL pain to install lots of packages at once. apt-get makes it easy to do stuff like this (from the tutorial i linked above):
so when you do apt-get update does it update successfully ?
IT looks like it doesn't have a complete list of packages from your source..
try this.. apt-cache policy php-pear
Where does the output say this package should come from ?
On a side note...
I'm curious why you think aptitude is more difficult that apt-get..
Your example for instance, using aptitude instead of apt-get would be..
How is that any more difficult that apt-get ? the only thing that has changed is the first word in the line, and you type one additional character..
aptitude handles dependency resolution better than apt-get, and is the recommended method of updating a Debian system since the release of Etch (per the devs), but you can make your own call to switch or stick with apt-get. keep in mind it is not any more difficult to use, so that reasoning doesn't fly . Aptitude command line reference
IF you do decide to switch to aptitude from apt-get make sure your first command is aptitude keep-all you only need to do that once, then you should use aptitude exclusively from there forward.
I managed to get php-pear installed using aptitude. I had NO IDEA aptitude was command-line capable. What happens when you need to choose between different versions of a package? like etch11 vs. etch13? Someone had told me it was GUI style so I had been manually selecting everything. How about php5-gd?
trying to install php5-gd with aptitude also fails:
Code:
debian2:~# aptitude install php5-gd
Reading package lists... Done
Building dependency tree... Done
Reading extended state information
Initializing package states... Done
Reading task descriptions... Done
Building tag database... Done
No candidate version found for php5-gd
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0B of archives. After unpacking 0B will be used.
Writing extended state information... Done
I don't have an apt.conf but I do have a preferences file. Here's the contents:
How APT Interprets Priorities
Priorities (P) assigned in the APT preferences file must be positive or negative integers. They are
interpreted as follows (roughly speaking):
P > 1000
causes a version to be installed even if this constitutes a downgrade of the package
990 < P <=1000
causes a version to be installed even if it does not come from the target release, unless the installed
version is more recent
500 < P <=990
causes a version to be installed unless there is a version available belonging to the target release or
the installed version is more recent
100 < P <=500
causes a version to be installed unless there is a version available belonging to some other distribution
or the installed version is more recent
0 < P <=100
causes a version to be installed only if there is no installed version of the package
P < 0
prevents the version from being installed
Code:
the Origin: line
names the originator of the packages in the directory tree of the Release file. Most commonly, this is
Debian. Specifying this origin in the APT preferences file would require the line:
Pin: release o=Debian
so your preference of -1 for any packages that come from Debian (with no specific archive selected) is telling the system do NOT install these packages... That looks like the reason apt won't install anything, because your preferences file is set to Not allow anything to be installed.
You guys are amazing. Thanks so much for your help.
As you might have surmised, I'm not the debian master configurator. It is my understanding according to that man page that the preferences file 'overrides the priorities that APT assigns to package versions by default, thus giving the user control over which one is selected for installation.' Let's re-examine my preferences:
I understand that o=Debian restricts the descriptor to any packages with origin=Debian and a=stable restricts the descriptor to a stable archive. That said, any packages with origin=Debian and archive=stable get the go-ahead value of 900 in my file.
On the other hand, ALL OTHER packages are not installed. Am I to understand that php5-gd is no longer considered stable? Or does it not originate from Debian? These concepts of Archive/Component/Origin/Label are pretty foreign to me. Any tips for a better apt preferences file would be much appreciated. My goal here is really just to have my dev server be a good, stable LAMP machine with current versions of Apache, MySQL, and PHP. Ideally, I'd like the latest PHP5, the latest MySQL release (is 6 out already???), and a version of apache that is as up-to-date and advanced as possible without introducing multi-threading problems due to the mongrel nature of PHP5.
EDIT:
I've also been looking to install the PHP ID3 functions and I'd like the latest version of Ming too. I have ming working but I installed php-getid3 but functions like id3_get_tag are still not defined. Yes, I did restart apache.
if there was an archive such as testing, unstable or experimental attached to that -1 entry it would make sense.
Personally I would just remove that section (the bottom 3 lines of the file) all together since it is not needed with a vanilla sources list.
or you could do as the example shows..
Code:
The following APT preferences file will cause APT to assign a priority higher than the default (500) to all
package versions belonging to a stable distribution and a prohibitively low priority to package versions
belonging to other Debian distributions.
Explanation: Uninstall or do not install any Debian-originated
Explanation: package versions other than those in the stable distro
Package: *
Pin: release a=stable
Pin-Priority: 900
Package: *
Pin: release o=Debian
Pin-Priority: -10
Remove the origin of Debian from your first entry.
Pinning is a big subject, you probably don't need it. Just delete the /etc/apt/preferences file, and study the concept at your leisure. Whoever set that file up, just didn't want nobody messing with nothin'. If it is now your system to mess with. Start studying. It's not rocket science, but you can do a better job of learning it on your own, than having us try to explain it in a paragraph or two.
When you honestly believe you have identified a need for it, ask specific questions. The man page excerpt farslayer posted includes basically everything you need to know.
Changing the pref file back to the example didn't help as far as installing gd. Removing those last 3 lines did. I now have gd installed and it's working. Thanks for that! I think apt will likely be more cooperative now.
Agreed that pinning is something worth studying and asking you for paragraph synposis is not fair. farslayer's recommendation to remove last 3 lines seems to be working.
Still having problems getting id3 functions visible in php. Any thoughts would be appreciated.
Last edited by sneakyimp; 11-18-2008 at 04:39 PM.
Reason: spelling
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.