apt – Internetblog.org.uk https://www.internetblog.org.uk Web hosting, Domain names, Dedicated servers Fri, 29 Jan 2016 11:05:52 +0000 en-US hourly 1 https://wordpress.org/?v=4.9.5 https://www.internetblog.org.uk/files/2016/01/cropped-favico-32x32.png apt – Internetblog.org.uk https://www.internetblog.org.uk 32 32 How to Remove Software in Linux https://www.internetblog.org.uk/post/1531/how-to-remove-software-in-linux/ Wed, 14 Jul 2010 19:22:06 +0000 http://www.internetblog.org.uk/post/1531/how-to-remove-software-in-linux/ Delete icon
Question: How do I remote software that I installed from my Linux dedicated server?

Answer: The answer to that question depends on how you installed the software in the first place. Once you establish how and where the software has been installed, you can determine how to remove it.

1. Package Manager – Most software should be installed with a package manager like YUM or Apt. If that is the case, you remove it with the normal command for the package manager:

yum remove [packagename] apt-get remove [packagename]

2. Manual Deb, RPM, etc – If you installed a distribution package manually, you can remove it manually or use your package manager to remove it.

3. Binary Archive – If you were given a tar.gz or similar package with binaries inside, and you unpacked them to a directory, simply remove the directory. If the package had an installer program, try using that to uninstall it.

4. Source – If you compiled the software from source and used “make install” to install it, removing it may be more tricky. If you still have the source files, you can simply run “make uninstall”. Otherwise, you will have to find out where the files were installed and remove. They may be in several directories.

]]>
What is a Linux Package? https://www.internetblog.org.uk/post/1520/what-is-a-linux-package/ Mon, 12 Jul 2010 19:13:06 +0000 http://www.internetblog.org.uk/post/1520/what-is-a-linux-package/
linux packageQuestion
: I have a new Linux dedicated server, and I have read a lot of documentation referring to packages. What are Linux packages?

Answer: In Linux distributions, a “package” refers to a compressed file archive containing all of the files that come with a particular application. The files are usually stored in the package according to their relative installation paths on your system. Most packages also contain installation instructions for the OS, as well as a list of any other packages that are dependencies (prerequisites required for installation.

Common types of Linux packages include .deb, .rpm, and .tgz. Since Linux packages do not usually contain the dependencies necessary to install them, many Linux distributions use package managers that automatically read dependencies files and download the packages needed before proceeding with the installation. Some examples of package managers are APT, YUM, and Pacman.

]]>
Software That Requires Perl Modules https://www.internetblog.org.uk/post/1358/software-that-requires-perl-modules/ Mon, 24 May 2010 16:22:02 +0000 http://www.internetblog.org.uk/post/1358/software-that-requires-perl-modules/ Perl camel logoWhen you install perl applications on a server, they will invariably require you to install additional modules for support. This is part of the unfortunate reality of running perl applications. Typically, the required module names will be displayed like this, Date::Format or File::Tail.

If you have ever tried to find the modules in your YUM or APT repositories, you probably had difficulty. That is because the naming scheme is different in Linux package management. For example, in most APT repositories, Date::Format is found in the package, libtimedate-perl, which also includes Date::Parse and some others. When you search for packages, just search for the keywords “date” and “format”, leaving off the “::”.

If you are sure the modules are not found in your package repository, you will have to install them manually. CPAN (Comprehensive Perl Archive Network) is a program that takes some of the pain out of installing perl modules, but it is still not a particularly enjoyable adventure. For more information about installing modules with CPAN, see this tutorial.

Photo Source: Wikimedia Commons

]]>
Upgrade Your Server with APT https://www.internetblog.org.uk/post/1280/upgrade-your-server-with-apt/ Wed, 05 May 2010 15:13:21 +0000 http://www.internetblog.org.uk/post/1279/upgrade-your-server-with-apt/ Debian logoDebian-based servers have a unique ability to easily upgrade from one major version to another without re-installation and will little reconfiguration.

To begin you will need to specify the location of the new packages in /etc/apt/sources.list. In other words, APT will need to know where the new packages are.

To upgrade an entire distribution to a new version of it, just run the following command as root:

apt-get dist-upgrade

There are a couple of things to consider when performing a full upgrade. Do you really need any of the latest packages? If your current distribution is still supported, it may not be worth the risk, and the risk is that some packages might not install correctly. Furthermore, downloading and installing so many packages will slow down your server while it is upgrading.

It is best to weigh the pros against the cons and then decide if your system really needs the upgrade or if you can keep it updated and secure with the current version.

]]>
Linux server dependencies https://www.internetblog.org.uk/post/1098/linux-server-dependencies/ Tue, 16 Mar 2010 13:48:27 +0000 http://www.internetblog.org.uk/post/1098/linux-server-dependencies/
Question: What are dependencies in Linux and how do I manage them?

Answer: In any operating system, an program requires other programs, drivers, and libraries of files to run. The program depends on those files, so they are called dependencies. Many commercial vendors will packages the dependencies in the installation files of the software, but this can create duplicates and also leave behind unnecessary clutter when the program is uninstalled.

The Linux method of dealing with dependencies is to let the system administrator decide how to handle them. Therefore, if you try to install a single Linux package, either from source or binary, it will require certain other packages to be already installed and configured. If they are not, the program will not be able to run and usually will not even install.

Package managers such as YUM and APT are therefore critical in a production server environment. These systems automatically find necessary dependencies for packages and install them before installing the package. As a result, your programs install and work immediately without any user intervention.

Photo Source: Flickr

]]>
How to manually install stubborn APT packages https://www.internetblog.org.uk/post/874/how-to-manually-install-stubborn-apt-packages/ Tue, 12 Jan 2010 14:05:10 +0000 http://www.internetblog.org.uk/post/873/how-to-manually-install-stubborn-apt-packages/ Debian logoQuestion: What do I do when I get the following error with apt-get: error processing /var/cache/apt/archives/packagename_0.80.1-1_all.deb : trying to overwrite ‘libsomething.1.0.so, which is also in “libotherpackage”?

Answer: These types of errors can be very annoying when trying to upgrade packages on a Linux server with apt-get. Sometimes these can be caused by adding third-party repositories, and other times it’s just an error by the distribution developers. At any rate, sometimes the solution can easily be solved with:

# apt-get -f install

If that works, you are done, but if it does not, you can try a more direct approach using dpkg, which is the program apt uses to install packages. From the root command prompt, enter:

dpkg --force-all -i /var/cache/apt/archives/packagename_0.80.1-1_all.deb

This will install the package and overwrite the offending file, ignoring any errors. Make sure the package you are installing is the right one before you do this. Otherwise, you might really do harm to your system, but most times the files truly are identical and have just been moved from one package to another. With that simple command, your problem should be solved.

]]>
Fixing APT problems https://www.internetblog.org.uk/post/773/fixing-apt-problems/ Fri, 11 Dec 2009 18:09:26 +0000 http://www.internetblog.org.uk/post/773/fixing-apt-problems/ Debian logoQuestion: I get an error on my server with apt-get, and it will not let me install any new packages. What should I do?

Answer: Depending on the error, there are a number of solutions you can try. The first is to tell APT to resolve any unfinished transactions or unmet dependences. As root or with sudo, type:

apt-get -f install

This will finish any installs that might have been interrupted or remove packages that were installed manually and cannot be completed because of dependency problems. If your packages were downloaded and installed but did not finish configuring, you can also run dpkg as root or with sudo:

dpkg --configure -a

This will finished any outstanding configurations. If those two general fixes do not work, you will need to diagnose the specific problem. Try searching some Linux forums or specific support pages for your distribution. Your web hosting provider might also have a knowledge base. Chances are, if you have a problem, others have experienced it as well.

]]>
How to perform upgrades with apt https://www.internetblog.org.uk/post/756/how-to-perform-upgrades-with-apt/ Mon, 07 Dec 2009 20:47:35 +0000 http://www.internetblog.org.uk/post/756/how-to-perform-upgrades-with-apt/ apt-get upgrade
Question: What is the difference between apt-get upgrade and apt-get dist-upgrade?

Answer: Apt-get upgrade is designed to update your Linux server packages to their latests versions. It will only upgrade the packages that are currently installed. Apt-get dist-upgrade will not only upgrade the current packages but will also install any new packages that may be needed or that were added to the distribution.

In a real-world situation, let’s say you have an Ubuntu server. Ubuntu releases updates, fixes, and security patches on a routine basis. To get those updates, you would run APT:

sudo apt-get upgrade

This would bring your server up to date with all patches and fixes, but you would still essentially have the same version of the distribution. On the other hand, every six months, they release a complete new version of the distribution that sometimes has new packages and new dependencies for packages. To do a complete in-box upgrade you would enter:

sudo apt-get dist-upgrade

Both are useful and needed, but for different reasons. Make sure you know which one you need before you try them.

]]>
Searching for applications with APT https://www.internetblog.org.uk/post/752/searching-for-applications-with-apt/ Fri, 04 Dec 2009 23:04:25 +0000 http://www.internetblog.org.uk/post/752/searching-for-applications-with-apt/ apt-get install anarchy
Using “apt-get install” works perfectly well as long as you know the name of an application, but if you do not, it becomes a guessing game. Fortunately, APT has a search tool you can use to find the applications or types of applications you need for your Linux server.

APT can search the repository cache on your server with the command “apt-cache search”. For example, if you want to search for Apache, enter as root:

apt-cache search apache

But suppose you want a module or plugin related to your web server but you do not know exactly what it is called or even the generic name for it. You can perform a search like this:

apt-cache search “web server”

This will search for any application that has “web server” in the name or description. APT will print a list of the names of the applications followed by descriptions:

libapache2-authenntlm-perl - Perform Microsoft NTLM and Basic User Authentication
libapache2-mod-bt - BitTorrent tracker for the Apache2 web server
libapache2-mod-lisp - An Apache2 module that interfaces with Lisp environments
libapache2-mod-ocamlnet - OCaml application-level Internet libraries - netcgi2 Apache2 connector
libapache2-mod-ruby - Embedding Ruby in the Apache2 web server
libapache2-mod-shib2 - Federated web single sign-on system (Apache module)
libapache2-mod-vhost-hash-alias - Fast and efficient way to manage virtual hosting

Find the one you want and only enter the name of the applications:

apt-get install libapache2-authenntlm-perl

Photo: Flickr

]]>
Installing applications with APT https://www.internetblog.org.uk/post/751/installing-files-with-apt/ Fri, 04 Dec 2009 22:50:22 +0000 http://www.internetblog.org.uk/post/751/installing-files-with-apt/ Debian logoIn a previous post, I explained how to install APT on a Linux server that does not have it. In this post, you learn how to use APT on any server that has it installed. Debian and Debian-based distributions, such as Ubuntu, use APT by default. The basic command for APT is “apt-get” in combination with other indicators. For example, if you want to install something, you use “apt-get install”.

To install Apache 2, you would type as root (or preceded by sudo):

apt-get install apache2
(or whatever the name for Apache is in your distribution)

APT uses a cache of repository lists to determine if something is available. Before installing anything, be sure to update the cache:

apt-get update

To remove an application, replace “install” with “remove”:

apt-get remove apache2

Be very careful with APT and keep in mind that any applications you install or uninstall will affect your server and every user account on it.

]]>