Posts

Showing posts with the label package

Fix freeradius-config installation error on Ubuntu 16.04 and FreeRadius3.0.X

Image
This morning, I just tried to install FreeRadius 3.0.X on my Ubuntu 16.04 server. And it said that I have to install freeradius-config in order to finish the installation. But, I got these error messages: ... dpkg: error processing archive /var/cache/apt/archives/freeradius-config_3.0.12-ppa1~xenial_amd64.deb (--unpack):  trying to overwrite '/etc/freeradius/hints', which is also in package freeradius 3.0.12-ppa1~xenial Errors were encountered while processing:  /var/cache/apt/archives/freeradius-config_3.0.12-ppa1~xenial_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1) ... So what I did to fix that is to run the following command to force orverwrite the freeradius-config page: sudo dpkg -i --force-overwrite /var/cache/apt/archives/freeradius-config_3.0.12-ppa1~xenial_amd64.deb Then the rest was fine.

Error with percona repo when running apt-get update

I ran apt-get update on a Ubuntu 12.04 server and this error came up: Err http://repo.percona.com precise Release Then I went into the Percona documentation and figure out how to fix it. It's to update the Percona's signing key: sudo apt-key adv --keyserver keys.gnupg.net --recv-keys 8507EFA5 Then everything works fine again.

dpkg - Searching installed packages

To search a package (let's call it 'abcd') installed in a linux sytem, run the following command: sudo dpkg -l | grep 'abcd' It is very useful for me to find a package name to remove.

Restore missing conf files of a package in /etc

Here is my case: - Remove nginx by using the command: sudo apt-get remove nginx - Delete /etc/nginx config folder: sudo rm -r /etc/nginx - Re-install nginx: sudo apt-get install nginx - Cannot start nginx because of missing conf file! Oops! After awhile searching on the Internet, I found a solution: All you need to do: Find the list of conffiles provided by the package: dpkg --status <package> (look under the  Conffiles:  section). Remove those conffiles yourself. Reinstall the package. If you've found the  .deb  file, dpkg -i --force-confmiss <package_deb>.deb Alternatively, passing the  dpkg  option via  apt  should work: apt-get install --reinstall -o Dpkg::Options::="--force-confmiss" <package> Especially in Ubuntu, I have to look for the packages in the cache folder, and It works: sudo dpkg -i --force-confmiss /var/cache/apt/archives/nginx*.deb Awesome!