Score:0

why is apt not able to locate the package once ran via script?

wf flag

I have this Ubuntu 22.04 virtual machine (vagrant) which I'm trying to append packages to with the following shell script

apt e.g.

firefox
flux
libimage-exiftool-perl 
perl-doc
vlc
wireshark
automake
openvpn
postgresql
telnet
tmux
wget

setup.sh

#!/bin/bash

sudo apt update -y
sudo apt upgrade -y
cat software/apt | while read line 
do
sudo apt-get install -y "$line"
done

aswell as similar approaches for snaps and adding .deb packages followed by dist-upgrade.

Running the script returns

 default: E: Unable to locate package firefox

Installing the packages manually, works fine.

Why? I'm trying to deploy a set of packages. How would you approach this?

hr flag
Can you please include a few complete verbatim error messages (not obfuscated with `...`). Did you create the `software/apt` in a Windows text editor?
hakim00 avatar
wf flag
I've edited the Question, ... is the package name. All files were created on windows, within VSCode.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.