I am coding Scala and would like an up-to-date 2.8.1 of it to be installed in my Ubuntu 10.10 system, but there is only obsolete 2.7 package available in Ubuntu repositories, so I have to go Slackware-way and use manual installation from tarballs. At the same time there is already scala_2.8.1.dfsg-1_all.deb available for Debian. Can't I just install it in Ubuntu?
Provided the dependencies are satisfiable, this should generally work.
Since this package probably has only been tested on Debian and not on Ubuntu there is a higher risk that e.g. it doesn't declare all the necessary dependencies or is incompatible with some change in Ubuntu.
You could use the jar installer as follows:
First download the IzPack Installer from the Scala Website, http://www.scala-lang.org/downloads.
Run it with
sudo java -jar installer.jar
and use the default folder /usr/local/scala for the installation
(where for me it was sudo java -jar scala-2.8.1.final-installer.jar).
Then edit /etc/environment so PATH is as follows PATH="... :/usr/local/scala/bin" and add SCALA_HOME=/usr/local/scala
Now logout and login again.