-3

How do I install a package in Debian via SSH? In my case I'm looking to install OpenSSL, but the instructions could be for installing any other package as well.

UPDATE: I did run into some issues while attempting to install OpenSSL (package dependencies). For an answer on how to (clear package dependency issues) while installing packages in Debian, please refer to this answer.

4 Answers4

1

sudo apt-get install packagename

In your case

sudo apt-get install openssl, if I remember correctly.

tomfanning
  • 3,398
1

You can use apt-get or dpkg

sudo apt-get install packagename

or

dpkg -i package-file-name    
user9517
  • 117,122
1

You might also look into Aptitude, a mildly more modern alternative. Or Synaptic, if you want a full GUI.

sudo aptitude install somepackage

Or for interactive mode:

sudo aptitude
Gnarfoz
  • 747
1
PKGPATH="$(apt-cache show openssl |grep ^Filename: |sed 's/^Filename: //')"
TDIR="$(mktemp -d)"
wget -O ${TDIR}/pkg.deb http://cdn.debian.net/debian/${PKGPATH}
pushd $TDIR
ar x pkg.deb
[ -x preinst ] && ./preinst install
tar xzf -C / data.tar.gz
[ -x postinst ] && ./postinst configure
popd
rm -rf $TDIR

Missing error handling, cleanup, version management (including picking the correct version based on all the magic apt does and passing the correct args to maintainer scripts), but basically functional in the minimal case.

womble
  • 98,245