LAMP server - cyclical reference

Asked by David Turner

I am trying to get the LAMP envioronment set up on natty Ubuntu and found a sinmple one-line instruction on an internet help forum which involved the word "tasksel".

I have been trying to install "tasksel" from the Ubuntu launchpad and have successfully installed the adptitude dependency BUT after that it required "tasksel-data"

When I tried to install "tasksel-data" it told me that it depended upon "tasksel"

I am using the latest Natty downloads with all downloads

Please advise overcoming this cyclical reference

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu apt Edit question
Assignee:
No assignee Edit question
Solved by:
Eliah Kagan
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

Try:

sudo apt-get --reinstall install tasksel-data tasksel

May do it

Revision history for this message
David Turner (dturnertms) said :
#2

no - this came up with error.

I have both tasksel and taksel-data (the latest versions) on USB downloaded from the Ubuntu launchpad site - the latest versions for Natty.

any other suggestions???

Revision history for this message
David Turner (dturnertms) said :
#3

The versions I am using are

tasksel_2.88ubuntu3_all.deb AND

tasksel-data_2.88ubuntu3_all.deb

I get, with each, dependency is required of the other file in the two whichever file I attempt to install

sudo apt-get install ... FAILS

Revision history for this message
Eliah Kagan (degeneracypressure) said :
#4

You should be able to install software with "sudo apt-get install ..." replacing ... with the packages you want to install. Dependencies are resolved automatically, even mutual dependencies. If you cannot do it this way, that suggests that the .deb packages you are trying to install might not be appropriate for your system. If you are not completely sure that they are appropriate for your system, then please let us know and we can help you look into that (please provide the exact error messages from the Terminal in this case -- you can just select *all* the text in the Terminal and post it here, and that will greatly maximize the likelihood that we'll what we need to understand what is happening on your system). It is only on very rare occasion that it makes sense to manually download .deb files from Launchpad (or anywhere) and install them manually.

With that said, you can install multiple .deb files at the same time with dpkg, such that they will install even if they depend on one another:

sudo dpkg -i tasksel_2.88ubuntu3_all.deb tasksel-data_2.88ubuntu3_all.deb

Revision history for this message
Eliah Kagan (degeneracypressure) said :
#5

By the way, if you're copying and pasting that command and it's split into two lines in your email, you should copy it from https://answers.launchpad.net/ubuntu/+source/apt/+question/166931 instead.

Revision history for this message
David Turner (dturnertms) said :
#6

the tasksel_2.88ubuntu.. files are currently on memomry device.

I opened terminal and entered the sudo apt-get command and it failed

I then copied the tasksel files that are on the memory device to the directory that I entered the apt-get command and again it failed.

Where shlould I be ciopying the tasksel files to - and where should I be entering the apt-get command??

Revision history for this message
Eliah Kagan (degeneracypressure) said :
#7

What do you mean by "memory device"?

To install tasksel, run this first, so that your local package information is current:

sudo apt-get update

Then run this to install the software:

sudo apt-get install tasksel

That is usually sufficient.

If you are running a desktop Ubuntu system, you run those commands in a Terminal. If you are running a Server Ubuntu system, you can run them in a virtual console or (if you have an SSH server installed) via SSH (these two methods also work on a desktop Ubuntu system. If you are using a desktop Ubuntu system, you can also install software in the Software Center, though if you have been experiencing problems, it is best to use the command-line so that you can provide all the text from the command-line here for us to see.

Is there some reason you are unable to provide all the text from the command-line?

Revision history for this message
David Turner (dturnertms) said :
#8

by memory device I mean USB memory stick

The apt-get update command you gave me looks like it is trying to access the internet which fails because I don't as yet have internet access on Ubuntu - I am still trying to get wireless adapter configured : please see my other posting on this support site. Someone else tried to give me an answer but hasn't replied to my last problem.

The output below was from the /home/dturner folder - I had previously placed the tasksel file into this folder. this is the folder that defaults to when launch terminal: The tasksel file was downloaded from the internet on Windows onto the USB previously, and then from USB to this folder.

dturner@ubuntu:~$ sudo apt-get install tasksel_2.88ubuntu3_all.deb
[sudo] password for dturner:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package tasksel_2.88ubuntu3_all.deb
E: Couldn't find any package by regex 'tasksel_2.88ubuntu3_all.deb'
dturner@ubuntu:~$ cd ..

WHere is it looking for this tasksel package?? Can I copy it to somewhere else on the Ubuntu file system to get it to work??

Thanks

Revision history for this message
Eliah Kagan (degeneracypressure) said :
#9

The best way to install .deb files that you have locally, especially when you know they are good (Launchpad uses HTTPS so they are in effect digitally signed--if the download from Launchpad completes successfully, then the file you have is good, at least when it was downloaded), is with dpkg.

If you are in the Terminal, in a directory that contains a .deb file that you want to install, then simply invoke dpkg -i with the name of the .deb file:

sudo dpkg -i tasksel_2.88ubuntu3_all.deb

If the file has dependencies, you could install them first, or install the file and its dependencies all at once (useful for circular dependencies) like this, as I had suggested before:

sudo dpkg -i tasksel_2.88ubuntu3_all.deb tasksel-data_2.88ubuntu3_all.deb

If that doesn't work, then please post the text from the Terminal that you get when running that command.

If you have a number of packages that you want to install, then you can put them all in a folder (let's call the it debs, and suppose it's a subdirectory of the directory you're in), and then install everything in the folder by invoking dpkg with the -R option as well as the -i option:

sudo dpkg -Ri debs

If you are connected to the Internet, you can install packages with apt-get by invoking it with the name of the package. This would be correct:

sudo apt-get install tasksel

It would not be correct to invoke apt-get with the name of a .deb package file you want to install, as that's what dpkg is for. Thus, commands like this one are *not* correct:

sudo apt-get install tasksel_2.88ubuntu3_all.deb # NOT CORRECT

The way "apt-get install ..." works is that it checks to see if the necessary files for installing all the specified packages (and their dependencies) are present in /var/cache/apt/archives, downloads whatever files are not present (putting them there), and then installs the packages (after checking their digital signatures). It will fail if there are any packages that are neither present nor downloadable. Thus, one method that some people like to use is to put manually downloaded .deb files in /var/cache/apt/archives, and then run "sudo apt-get install ..." where ... is replaced by the name or names of the package(s) to be installed. However, while this method sometimes works, it also sometimes fails, because it relies on the local package information cache to determine what versions are to be installed and what files are needed. Thus, it tends to fail for installing .deb files that were released after "sudo apt-get update" was last successfully run. That is why I do not tend to recommend that method. Downloading the files from Launchpad makes sure you're not getting a corrupted download (because of HTTPS), and then "sudo dpkg -i ..." or "sudo dpkg -Ri ..." is a much more reliable method.

However, apt-get is still useful for easily discovering information about all of a package's dependencies. If you have not recently run "sudo apt-get update" successfully, then it is possible that the dependency information will be wrong, but it is usually right. You can determine a package's dependencies (and thus know what other packages you must manually download from Launchpad and install along with it, when installing the package without an Internet connection) by performing a *simulation* of installing the package with apt-get:

apt-get -s install ...

The absence of sudo is intentional; simulations do not need to be run as root. And as before, ... is to be replaced with the name of the package or packages you want to install. So if you were to run

apt-get -s install tasksel

then you would find out what packages you need to install, to support tasksel.

Since "apt-cache policy tasksel" didn't work for you in https://answers.launchpad.net/ubuntu/+source/tasksel/+question/165600, "apt-get -s install tasksel" would likely not work either in this situation. But if it doesn't, then installing tasksel by putting the .deb files in /var/cache/apt/archives is *guaranteed* to fail (apt-get cannot install a package it doesn't know about). Installing it with dpkg should still work fine.

Of course, it is almost always easiest to provide the computer with an Internet connection; then you don't have to do any of this. Plugging the computer into the Ethernet port of a cable/DSL modem, router, or switch usually works.

If you do have to perform extensive or long-term package management tasks in Ubuntu without an Internet connection, then you should use something like Keryx which facilitates this (http://keryxproject.org/).

By the way, you can read documentation about commands (like apt-get and dpkg) with the man command. For example, to view the manual page for dpkg, you could run:

man dpkg

You can scroll up and down a line with the arrow keys, down a page with Spacebar or Page Down, scroll up a page with B or Page Up, you can quit with q, and if q doesn't work, press Escape a few times and then press q again. That's enough instructions to enable you to use man fully, because anything else you need to know about man, you can find out with man's manpage:

man man

(On a computer with an Internet connection, you can also view Ubuntu's manual pages online at http://manpages.ubuntu.com.)

You should feel free to continue posting here on Launchpad for help; however, since there is some delay between when you post and when you receive a reply, you might also consider using man to make sure you are running commands correctly (for example, you could have seen in "man apt-get" that "apt-get install ..." doesn't work with full package file names, and thus gotten to the point you are right now as of this post, yesterday).

Sometimes manual pages are extremely complicated, or targeted to people with lots of technical skill, and occasionally they are just poorly or unclearly written, or woefully incomplete. And often when an error occurs it has some cause besides commands being invoked with wrong syntax. So I emphasize again that you should not hesitate to use this forum. I just wanted to give you another tool for your toolbox--the ability to use manual pages confers an enormous amount of independence upon a user of a Unix-like operating system such as Ubuntu, when it comes to performing tasks on the command-line.

Revision history for this message
David Turner (dturnertms) said :
#10

Thanks - this answers this question for me. I used dpkg and installed both taskels. (I am next going to attempt to use tasksel to install LAMP - as per instructions on another site)

My main problem though is still not being able to get onto the internet under Ubuntu:

I have successfully installed ndiswrapper and the drivers and I have set up network info. But earlier in the week I reached a hurdle and not got over it yet - the problem is posted on number 166402

Many thanks though for your detailed reply

Revision history for this message
Best Eliah Kagan (degeneracypressure) said :
#11

Since the problem you posted this question about is now resolved, please mark this question as Solved. (You can do that at https://answers.launchpad.net/ubuntu/+source/apt/+question/166931.) Your other problem of getting your wireless working will continue to be worked on in https://answers.launchpad.net/ubuntu/+source/gnome-nettool/+question/166402.

Revision history for this message
David Turner (dturnertms) said :
#12

Thanks Eliah Kagan, that solved my question.