I'm completely new to Ubuntu. I got installed it because my school uses a lot of Linux type stuff in my school's Computer Science program so I figured I would use Ubuntu on my own machine and just do my code from there instead of the computer labs. However, I'm having a lot of trouble trying to install the numerous packages that aren't included natively on Ubuntu. Can someone help me install the PNG library, libpng and zlib. This is just one of many things I need to get on here but I think I need to first start off with this. I did download both packages, did the tar xf thingy on the download, and looked at the README files for insight on installing the software. I get weird errors though. I first tried installing libpng and the terminal was like zlib isn't installed so I was like ok, I'll just get zlib but permission is denied. Do I need to get root or something? I remember seeing people say root before, but I don't know if it is relevant. I'm really new so I don't understand a lot of these things and it's kinda scary. Please help.
Ubuntu uses a thing called
apt, which is a package manager. It installs, manages, upgrades, and removes programs. If at all possible, you should try to install programs via Ubuntu Software Center. What you were likely attempting to do was install from source, which is only recommended if you know what you're doing.
Try to get out of the Windows mentality, which is to search google and download an installer. The Ubuntu Software Center searches Ubuntu's online repositories, which are generally guaranteed to work. Programs installed via Software Center or
apt will also be updated automatically by Ubuntu's Software Updater.
You can install libpng from the Software Center by searching libpng and choosing "PNG Library - runtime". Or from here libpng12-0 by clicking "available on the Software Center". Or using
sudo apt-get install libpng12-0 from a terminal.
zlib1g package should be installed automatically when you install
libpng12-0, because it is one of the
libpng12-0 package's dependencies. The package manager
apt installs all of a package's dependencies before it installs the package.