-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.

amateur barista
  • 478
  • 3
  • 7
  • 21
  • Simple questions help people whose primary role is not system administration. It also helps the advanced users of this site by generating the search engine hits and page views required to sustain ServerFault. Not sure why the down votes. – amateur barista Aug 06 '12 at 07:55
  • 2
    Probably because the question doesn't display *any* research effort. If you had answered your own question you probably wouldn't have received any downvotes. – Ladadadada Aug 06 '12 at 08:11
  • I did research and did find the answer on other sites. I just wanted to put a very simple QA question on SF, that's what this site is for. And I also wanted someone else to get the points for answering it. I don't see any problem with that? "Probably because the question doesn't display any research effort" is an assumption. But OK. Thanks for the comment. – amateur barista Aug 06 '12 at 08:18

4 Answers4

1

sudo apt-get install packagename

In your case

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

tomfanning
  • 3,308
  • 6
  • 33
  • 34
1

You can use apt-get or dpkg

sudo apt-get install packagename

or

dpkg -i package-file-name    
user9517
  • 114,104
  • 20
  • 206
  • 289
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
  • 698
  • 4
  • 10
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
  • 95,029
  • 29
  • 173
  • 228