In this case, it's not really an error, and will have no impact on the installation of your packages
apt-get
complains because it is not working inside a regular Unix terminal.
However, you can try to fix these warning by adding this directive in your Capistrano deploy file:
set :pty, true