Jump to content

Can I put Linux packages into a file and tell the command prompt to download from the file?

I'm wanting to take Ubuntu mini iso and build the os on top of it using commands and packages of my own choice, can I take and download the packages from the internet and put the packages into a file named download and go to the command prompt and tell it to sudo apt install "downloads directory" ?

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, Enderg312 said:

can I take and download the packages from the internet and put the packages into a file named download and go to the command prompt and tell it to sudo apt install "downloads directory" ?

No, you'd download the packages into a directory, not a file. Also, the specific command to install a package is "dpkg -i packagenameshere", but you need to install them in the correct order -- the command does not attempt to sort the packages by their dependencies, so you can't just use an asterisk to install all of the packages at once, as you'd likely run into failed dependencies.

Hand, n. A singular instrument worn at the end of the human arm and commonly thrust into somebody’s pocket.

Link to comment
Share on other sites

Link to post
Share on other sites

16 minutes ago, Enderg312 said:

I'm wanting to take Ubuntu mini iso and build the os on top of it using commands and packages of my own choice, can I take and download the packages from the internet and put the packages into a file named download and go to the command prompt and tell it to sudo apt install "downloads directory" ?

I'd suggest looking into Arch Linux if that's how you want to install your OS.

 

Internet-connected Linux computers are kept up to date and secure by a package manager. I highly recommend you use them and their repositories, to take advantage of the work of many people providing the OS's.

Main: AMD Ryzen 7 5800X3D, Nvidia GTX 1080 Ti, 16 GB 4400 MHz DDR4 Fedora 38 x86_64

Secondary: AMD Ryzen 5 5600G, 16 GB 2667 MHz DDR4, Fedora 38 x86_64

Server: AMD Athlon PRO 3125GE, 32 GB 2667 MHz DDR4 ECC, TrueNAS Core 13.0-U5.1

Home Laptop: Intel Core i5-L16G7, 8 GB 4267 MHz LPDDR4x, Windows 11 Home 22H2 x86_64

Work Laptop: Intel Core i7-10510U, NVIDIA Quadro P520, 8 GB 2667 MHz DDR4, Windows 10 Pro 22H2 x86_64

Link to comment
Share on other sites

Link to post
Share on other sites

Not only would they need to be installed in a specific order, but you would also need to track down the various dependencies, which may not  always be as simple as it sounds.

Package A could have 5 Dependencies, then Dependency B and C could have another 3 dependencies, and the chain continues. It can quickly turn into dependency hell.

You also stated that you want to pick and choose from a minimal install, Ubuntu's dependencies are statically linked so you don't get much of a choice in what actually comes with package X. You would need to rebuild the packages individually to your needs. What your asking for is What Arch is designed around, you might consider looking into it.

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, Nayr438 said:

Not only would they need to be installed in a specific order, but you would also need to track down the various dependencies, which may not  always be as simple as it sounds.

Package A could have 5 Dependencies, then Dependency B and C could have another 3 dependencies. It can quickly turn into dependency hell.

You also stated that you want to pick and choose from a minimal install, Ubuntu's dependencies are statically linked so you don't get much of a choice in what actually comes with package X. You would need to rebuild the packages individually to your needs. What your asking for is What Arch is designed around, you might consider looking into it.

I watched a video on someone downloading Ubuntu mini iso and then they click install by command line or something and they built the os on top of the Ubuntu mini by downloading packages and setting it up to their prefrence. So I don't understand why your telling me to something else when I watched a whole video on it, im just wanting to install some of the beginning packages into a file/directory and then typing whatever the command may be to install them. 

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, Enderg312 said:

I watched a video on someone downloading Ubuntu mini iso and then they click install by command line or something and they built the os on top of the Ubuntu mini by downloading packages and setting it up to their prefrence. So I don't understand why your telling me to something else when I watched a whole video on it, im just wanting to install some of the beginning packages into a file/directory and then typing whatever the command may be to install them. 

So is your goal just to have less packages in ubuntu? If so you can easily just use the minimal install and add packages as needed. Or start with ubuntu server. 

 

But why not try it on a vm? Or follow the video?

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, Enderg312 said:

What is vm?

virtual macine. Lets you run a os in a os. Try doing that to test the ubuntu install with less hassle.

Link to comment
Share on other sites

Link to post
Share on other sites

31 minutes ago, Electronics Wizardy said:

virtual macine. Lets you run a os in a os. Try doing that to test the ubuntu install with less hassle.

Yea that is actually what the video was showing to do but every time I gone to load it up the Ubuntu OS couldn't find my storage or something the scan fail and then when I wanted to cancel the install it even failed to let me cancel.

Link to comment
Share on other sites

Link to post
Share on other sites

22 minutes ago, Enderg312 said:

I watched a video on someone downloading Ubuntu mini iso and then they click install by command line or something and they built the os on top of the Ubuntu mini by downloading packages and setting it up to their prefrence. So I don't understand why your telling me to something else when I watched a whole video on it, im just wanting to install some of the beginning packages into a file/directory and then typing whatever the command may be to install them. 

If they were connected online and pulling from the repository using the package manager apt, then dependency resolution is handled for you. My explanation on Packages was regarding your offline install, which is assumed since your wanting to put them into a folder.

Statically linked dependencies are also a real thing, it's up to the packager to determine what should be the minimum requirements for a package, in Ubuntu it's focused on simplicity so they include nonessential dependencies whether you use them or not. Whether you care about that or not is a different story.

 

If you watched a video and were satisfied with the results however, then just follow the video.

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, Nayr438 said:

If they were connected online and pulling from the repository using the package manager apt, then dependency resolution is handled for you. My explanation on Packages was regarding your offline install, which is assumed since your wanting to put them into a folder.

Statically linked dependencies are also a real thing, it's up to the packager to determine what should be the minimum requirements for a package, in Ubuntu it's focused on simplicity so they include nonessential dependencies whether you use them or not. Whether you care about that or not is a different story.

 

If you watched a video and were satisfied with the results however, then just follow the video.

That is what "Electronics Wizardy" and I are talking about.

Link to comment
Share on other sites

Link to post
Share on other sites

52 minutes ago, Enderg312 said:

Yea that is actually what the video was showing to do but every time I gone to load it up the Ubuntu OS couldn't find my storage or something the scan fail and then when I wanted to cancel the install it even failed to let me cancel.

What do you mean by not find you storage? Can you show a error message?

 

Id start out with a efault insta..

Link to comment
Share on other sites

Link to post
Share on other sites

Yea I didn't think to screenshot the error message. But I think it said that it couldn't find a file, when I downloaded the iso off their website. But it came up with the error couldn't find something and it was the section where it would check the disk.

Link to comment
Share on other sites

Link to post
Share on other sites

There are ways to do what the OP wants (conversely to what some replies here claim). I've done this before, way back when I had a computer with no internet-connection (actually, the computer had a slow modem connection but it was not used for upgrading, since it would not have been feasible), and wanted to upgrade it's Debian-based distribution. Though, I must admit I'm not 100% sure what the OP wants and if this way is the right tool for the job, but if the goal is to be able to upgrade a Debian-based distribution without an internet connection (or a non-usable, for example, too slow one), it can be done. Anyways, an internet connection is not required for upgrading (or installing additional packages), but of course some other way to transfer files from another Debian-based computer is (and as for security, for an offline computer this should not be an issue).

 

What is needed is another computer with a fast (enough) internet connection and of course something to transfer the files to the other computer. One needs to confirm the computer used to fetch the packages uses exactly the same sources.list configuration (obviously, if they use a different configuration this will not work). Then fetch the packages and metadata. Packages need to be fetched so that apt assumes no installed packages (there are switches in apt or other tools to do this). This will handle dependencies, and can also be used to fetch packages for new (not-installed on the target) software.

 

After this has been done, move the metadata + packages to the computer with no internet connection (USB drive, HDD...),  configure an offline repository on the target and apt-update and upgrade (or install) as usual.

 

My memory is hazy but IIRC I used a method similar to this which is a bit different to what the link in Ubuntu help page posted by @TorC.

 

There may be other ways. Probably nothing which can be done with a few mouse clicks via a GUI (as this is a bit too special use case), but something which requires a little bit of searching and reading documentation.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×