How can I install Celestia on Ubuntu 18.04.1?

You can install Celestia by compiling sourcecode by following below steps.

Install dependencies and required packages.

sudo apt install qtbase5-dev-tools qtbase5-dev libqt5opengl5-dev qtchooser libglu1-mesa-dev libpng-dev libjpeg-dev libtheora-dev liblua5.3-dev build-essential

Clone Source code from repository.

git clone https://github.com/CelestiaProject/Celestia

Compile Source Code. It will take long time 5-10 mintes.

cd Celestia && mkdir build && cd build
qmake -qt=5 PREFIX=/opt/celestia -o Makefile ../celestia.pro
make

Install Celestia.

sudo make install

To install Celestia in 18.04, open a terminal and do:

wget https://raw.githubusercontent.com/simbd/Scripts_Ubuntu/master/Celestia_pour_Bionic.sh && chmod +x Celestia* && sudo ./Celestia*

Celestia will then be available in 'Show Applications' or you can launch it from the terminal with:

celestia

I was not able to change travel speed in 1.7 (F1-F5, A,Z), other people do not report problem.

1. Development snapshot - repository 1.7

Follow instructions in INSTALL.md - github or opensuse

Note: I had to download key manually.

Adding launcher to favorite apps bar

copy icon to icons folder

# sudo cp ../src/celestia/qt/data/celestia.png /usr/share/icons/hicolor/128x128/apps # for source -see below 
sudo cp /usr/share/celestia/celestia-logo.png /usr/share/icons/hicolor/128x128/apps/celestia.png

make .desktop file

cat >$HOME/.local/share/applications/celestia.desktop <<'EOL'
[Desktop Entry]
Version=1.7.0
Type=Application
Name=Celestia
GenericName=Space simulator
Comment=Open source space simulator
TryExec=/usr/bin/celestia
Exec=/usr/bin/celestia
Categories=Astronomy;Science;Qt;
Icon=/usr/share/icons/hicolor/128x128/apps/celestia.png
MimeType=application/x-celestia-script
Terminal=false
EOL

cd $HOME/.local/share/applications/

chmod +x celestia.desktop

Adding to favorites

cat >addToMenu.sh <<'EOL'
#!/usr/bin/env bash
STATE=`gsettings get org.gnome.shell favorite-apps`
STATE=$(sed 's/]/,'\ \'celestia.desktop\'']/g' <<< $STATE)
gsettings set org.gnome.shell favorite-apps "${STATE}"
EOL

bash addToMenu.sh

2. version 1.6.1

Follow instructions in link

3. version 1.6.2 beta

#Download beta tar.gz from:
https://github.com/CelestiaProject/Celestia/releases

sudo apt install libgtk2.0-dev
sudo apt install libgtkglext1-dev
sudo apt install liblua5.3-dev
    
tar xzvf Celestia-1.6.2-beta3.tar.gz 
cd Celestia-1.6.2-beta3

libtoolize
autoreconf -f
./configure --with-gtk
make
sudo make install

which celestia # for .desktop
# /usr/local/bin

# for logo, see above
find -name "celestia-logo.png"
#../src/celestia/gtk/data/celestia-logo.png

4. development version from source 1.7

In addition to the previous answer qt libraries, I had to install:

sudo apt install libglew-dev libeigen3-dev libluajit-5.1-dev
sudo apt install libgtk-3-dev libfmt-dev libtheora-dev libjpeg-dev

clone as in previous answer

git clone https://github.com/CelestiaProject/Celestia
cd Celestia && mkdir build && cd build

install with cmake

cmake -o Makefile ../
make
sudo make install

In celestia.desktop file, use:

TryExec=/usr/local/bin/celestia-qt
Exec=/usr/local/bin/celestia-qt

For the record, I had to completely uninstall anaconda (source only).