Where is apt-get?


Forum: Apt-get
Topic: Where is apt-get?
started by: pdone

Posted by pdone on Feb. 20 2004,16:45
Hi

I'm new to DSL and also Debian/apt so please be gentle with me.

I've just booted my new DSL 0.6 CD and was under the impression that I could use apt-get, however I don't seem to have this. I read somewhere about running dpkg-restore first so I tried that but no luck. Am I wrong in assuming apt-get is included in the ISO?

Here's what I did...

Code Sample

damnsmall@box:~$ apt-get
bash: apt-get: command not found
damnsmall@box:~$ ls /etc/apt
ls: /etc/apt: No such file or directory
damnsmall@box:~$ sudo dpkg-restore
Grabbing the compressed dpkg database and programs...
Connecting to damnsmalllinux.org[65.218.1.33]:80
dpkg-install.tar  100% |*****************************| 940 KB 00:00 ETA
dpkg-install.sh
dpkg.tar.bz2
/usr/sbin/dpkg-restore: line 6: dpkg-install.sh: command not found
Updating apt-get
/usr/sbin/dpkg-restore: line 8: apt-get: command not found
All done
damnsmall@box:~$


What am I doing wrong?

(by the way, DSL is fantastic).

Cheers

Paul

Posted by pdone on Feb. 20 2004,23:13
I've been investigating further. There seems to be an error in the dpkg-restore script.

The line:

Code Sample
dpkg-install.sh


..should read...

Code Sample
./dpkg-install.sh


..however with even this change, the script still fails further on....

Code Sample

root@ttyp1[damnsmall]# ./dpkg-restore
Grabbing the compressed dpkg database and programs...
Connecting to damnsmalllinux.org[65.218.1.33]:80
dpkg-install.tar     100% |*****************************************************************************|   940 KB    00:00 ETA
dpkg-install.sh
dpkg.tar.bz2
etc
etc/apt
etc/apt/apt.conf
etc/apt/apt.conf.d
etc/apt/apt.conf.d/70debconf
etc/apt/sources.list
usr
usr/bin
usr/bin/dpkg-split
tar: usr/bin/dpkg-split: Read-only file system
Updating apt-get
./dpkg-restore: line 8: apt-get: command not found
All done


So apt-get and other files cannot be unpacked into the filesystem because part of the filesystem is mounted as read-only - I don't really understand how this script can work for other people unless it is because I am using the 'toram' boot option. Any ideas?

Cheers

Paul

Posted by cbagger01 on Feb. 21 2004,18:04
The dpkg-restore script will not work on a computer that is running DSL from the liveCD or from the "toram" option.

It will only work if you execute it after doing an hd-install.


However, there is another way to get the apt-get working on a computer that is running from the liveCD. Try my apt-get/synaptic install script:

< http://damnsmalllinux.org/cgi-bin....ynaptic >

It will let you use apt-get on a computer that is running from liveCD.

It should work on all 0.5.x versions of DSL.  It does not work on version 0.6 because some of the linux core programs were replaced with the "busybox" utility (to save disk space) and busybox does not have the full functionality of the original commands.

Good Luck.

Posted by Modrak on Feb. 22 2004,19:41
Oh my god...
Dear LAMER
you need to be root
so do "sudo dpkg-restore"

Try this joke
Code Sample
apt-get help
apt-get moo

____
Lamer doesn't do moo :-)

Posted by cbagger01 on Feb. 22 2004,20:15
Line 5 of his post says:

damnsmall@box:~$ sudo dpkg-restore


Perhaps one should actually READ the guy's post before calling him a LAMER.

Nice try though. Bonus unintended comedy points.

Posted by hasty on Feb. 22 2004,20:15
Don't be too fierce.....it's not a fragfest
We all have to start somewhere :) and any variety of linux is confusing at first.

pdone is actually trying

p.s. You fight like a farmer :D

Posted by TyphoonMentat on Feb. 22 2004,20:29
Yes, Modrak, these forums aren't really the place where "l33t h4x0rz" call people lamers...
Posted by pdone on Feb. 22 2004,23:56
Hi cbagger01

Thanks for the responses.

Are the busybox issues to do with the following two commands:

Code Sample

  cp -srd /KNOPPIX/somewhere/ /ramdisk
  ln -sf --target-directory=/ /ramdisk/somewhere


Looking at the busybox documentation, 'cp' doesn't support the 's' argument to create symbolic links instead of copying and 'ln' doesn't support the '--target-directory'.

Any thoughts on how the script could be modified for 0.6.? I was thinking that the output of 'find /KNOPPIX/somewhere' could be looped thru and a symbolic link created for each result file relative to '/ramdisk/'.

I might give this a try if you think I'm on the right track because your script looks spot on for the sort of stuff I want to do.

Cheers

Paul

Posted by cbagger01 on Feb. 23 2004,05:47
My quick advice is to download 0.5.3.1 and use it instead of 0.6 for the short term.

My longer term advice is more of a suggestion to John (& Robert):

Is there an alternative to replacing ALL of the core Linux utilities with BusyBox?

There are several programs (like cp, ln, tar, gzip) that just don't work the same in Busybox and in some situations, this cripples the OS.

I am sure that there are other shell scripts/install scripts out there that will work properly in 0.5.3.1 but will bomb out in 0.6

Can you please bring back the above mentioned core Linux programs in a future version of DSL?

Posted by Rapidweather on Feb. 26 2004,02:11
So _that's_ what happened to some of my scripts when run in 6.
---
 ???

Posted by Modrak on Feb. 26 2004,09:00
I'm sorry...but now I know the dpkg-restore can't be run on LiveCD
You must have hdiinstalled DSL :-/
It even doesn't run with knoppix toram

Posted by hasty on Feb. 26 2004,09:17
Well spotted !

I took the easy option and reinstalled 5.3 :laugh:

Posted by Arnt Karlsen on Feb. 27 2004,04:07
Quote (cbagger01 @ Feb. 23 2004,00:47)
My quick advice is to download 0.5.3.1 and use it instead of 0.6 for the short term.

My longer term advice is more of a suggestion to John (& Robert):

Is there an alternative to replacing ALL of the core Linux utilities with BusyBox?

There are several programs (like cp, ln, tar, gzip) that just don't work the same in Busybox and in some situations, this cripples the OS.

I am sure that there are other shell scripts/install scripts out there that will work properly in 0.5.3.1 but will bomb out in 0.6

Can you please bring back the above mentioned core Linux programs in a future version of DSL?

..one good way is add '--verbose|-v' to Busybox on the cd, and make the real stuff available on hd installs thru an apt-get --purge Busybox dependency.

..on remastering, I usually junk the DSL kernel and put in the one from clusterKnoppix, and I also toss in 1152x864 and 15bpp and 7 rodent buttons into '/usr/sbin/xsetup.sh', I guess it can take more options.

Posted by cbagger01 on Feb. 29 2004,08:53
Check out the link below to the latest version of my Synaptic install script.  This script DOES work with DSL versions 0.6.x and you can even use it if you are running from the LiveCD.

It is also an automated way to get apt-get to work with Synaptic 0.16

The new script is located at the bottom of the linked page:

< http://damnsmalllinux.org/cgi-bin....2;t=122 >

Posted by pdone on Mar. 02 2004,13:52
Great stuff - I'll try this when I get home.

Don't know if this has been discussed before, but I came accross Translucency...

< http://freshmeat.net/projects/translucency/ >

Apparently this enables a user to mount a read-write filesystem over the top of an existing read-only filesystem.

Snip:
Code Sample

Translucency is a loadable kernel module for Linux that virtually merges two directories, making it possible to overwrite files on read-only media and compile projects (such as the Linux kernel) with different options without copying sources each time. No user-space tools have to be changed. The process is also known as inheriting (ifs), stacking, translucency (tfs), loopback (lofs), and overlay (ovlfs).


Wouldn't this be a great solution for DSL for installing apps when using the LiveCD, if the LiveCD automatically mounted a read-write Translucency filesystem over the top of the read-only cd filesystem. Combine this with the ability to back-up/restore the overlayed app files (translucency filesystem) to the tar.gz on a USB, then this could be really powerful.

Paul

Posted by TyphoonMentat on Mar. 02 2004,17:51
This is a lot like ovlfs - check out SLAX for an example of that.
Posted by pdone on Mar. 03 2004,12:37
cbagger01: I tried your synaptic script last night and it worked perfectly - thank you very much   :)

It would be great if this script was included by default as a menu and/or desktop link.

Paul

Posted by marcosg on Mar. 09 2004,05:22
1ºSo... I understand that ¿without a net conection I cant use app-get??
Oh no!
2º In that Case, how could I run apps that comes in .rpm packages and apps that are not compiled???????????????
thanks!

Posted by cbagger01 on Mar. 09 2004,05:59
You still need to use the dpkg-restore script before you can install packages.

Please download the restore file on a networked computer and copy it over to your DSL computer:

< http://www.damnsmalllinux.org/dpkg.tar.gz >

Then run the dpkg-restore script.


sudo su
dpkg-restore
exit


Next, you will need to search for packages that end in .deb instead of .rpm

These are called Debian packages instead of RPMs.

Once you have copied the file to your computer from another computer that has network access (use USB flash disk or use CD-R), you can install the program by typing:

sudo su
dpkg  -i  filename.deb
exit


You can get many packages by downloading them from the following web site:

< http://ftp.debian.org/debian/pool/main >

Good Luck.

Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.