if the package you are installing has unsatisfied dependencies you will need to install them first in a similar fashion since opkg isn't using a repository where it can find the needed packages.
Watch the flash usage, if you fill it up the Yun won't be able to boot anymore and you'll need to do a reset-to-factory-anyway from a failsafe prompt which wipes any changes you have made. You fill it up through a repository or Luci System->Software installation too.