Here is my citations/research:

To install a single man page: http://askubuntu.com/questions/244809/how-do-i-manually-install-a-man-page

To install multiple manpages: http://unix.stackexchange.com/questions/79028/debian-install-missing-man-pages

Here is my article:

If your server came without man/man pages installed most likely its because it doesnt have the capacity to hold all of that. Either Way man pages are pretty slow.

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
apt-get update
apt-get install man
apt-get install manpages
apt-get install manpages-dev
apt-get update apt-get install man apt-get install manpages apt-get install manpages-dev
apt-get update
apt-get install man
apt-get install manpages
apt-get install manpages-dev

To get missing man pages reinstall the app (current version app):

WARNING IF THIS BREAKS YOUR SYSTEM DONT YELL AT ME (OR SUE ME), MAKE A BACKUP FIRST

Lists all installed packages with their current version number:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
dpkg -l | grep '^ii ' | sed 's/ */\t/g' |cut -f 2,3 | sed 's/\t/=/'
dpkg -l | grep '^ii ' | sed 's/ */\t/g' |cut -f 2,3 | sed 's/\t/=/'
dpkg -l | grep '^ii ' | sed 's/ */\t/g' |cut -f 2,3 | sed 's/\t/=/'

EX OUTPUT:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
ttf-bitstream-vera=1.10-8
tzdata=2014j-0wheezy1
ucf=3.0025+nmu3
udev=175-7.2
ttf-bitstream-vera=1.10-8 tzdata=2014j-0wheezy1 ucf=3.0025+nmu3 udev=175-7.2
ttf-bitstream-vera=1.10-8
tzdata=2014j-0wheezy1
ucf=3.0025+nmu3
udev=175-7.2

Downloads all of the current versions:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
dpkg -l | grep '^ii ' | sed 's/ */\t/g' |cut -f 2,3 | sed 's/\t/=/' | xargs apt-get install --reinstall -y --ignore-missing
dpkg -l | grep '^ii ' | sed 's/ */\t/g' |cut -f 2,3 | sed 's/\t/=/' | xargs apt-get install --reinstall -y --ignore-missing
dpkg -l | grep '^ii ' | sed 's/ */\t/g' |cut -f 2,3 | sed 's/\t/=/' | xargs apt-get install --reinstall -y --ignore-missing

The problem with above command is that it lists all packages in one single long “apt-get install” command. Apt-get tends to fail on really long commands.

So the above command would run this:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
apt-get install --reinstall -y --ignore-missing ttf-bitstream-vera=1.10-8 tzdata=2014j-0wheezy1 ucf=3.0025+nmu3 udev=175-7.2
apt-get install --reinstall -y --ignore-missing ttf-bitstream-vera=1.10-8 tzdata=2014j-0wheezy1 ucf=3.0025+nmu3 udev=175-7.2
apt-get install --reinstall -y --ignore-missing ttf-bitstream-vera=1.10-8 tzdata=2014j-0wheezy1 ucf=3.0025+nmu3 udev=175-7.2

Imagine if you had 400 packages to install. That would break apt-gets brain!

So it might be better to install each package individually

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
PKGS=$(dpkg -l | grep '^ii ' | sed 's/ */\t/g' |cut -f 2,3 | sed 's/\t/=/'); TOTAL=$(echo $PKGS | wc -w); NN=0; for i in $PKGS; do NN=$((NN+1)); echo ===${NN}/${TOTAL}: INSTALLING $i===; apt-get install --reinstall -y --ignore-missing "${i}"; done;
PKGS=$(dpkg -l | grep '^ii ' | sed 's/ */\t/g' |cut -f 2,3 | sed 's/\t/=/'); TOTAL=$(echo $PKGS | wc -w); NN=0; for i in $PKGS; do NN=$((NN+1)); echo ===${NN}/${TOTAL}: INSTALLING $i===; apt-get install --reinstall -y --ignore-missing "${i}"; done;
PKGS=$(dpkg -l | grep '^ii ' | sed 's/ */\t/g' |cut -f 2,3 | sed 's/\t/=/'); TOTAL=$(echo $PKGS | wc -w); NN=0; for i in $PKGS; do NN=$((NN+1)); echo ===${NN}/${TOTAL}: INSTALLING $i===; apt-get install --reinstall -y --ignore-missing "${i}"; done;

SIDENOTE:

To install a specific version of a package:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
apt-get install --reinstall <package>=<version>
apt-get install --reinstall <package>=<version>
apt-get install --reinstall <package>=<version>

To Re-install a specific version of a package:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
apt-get install --reinstall <package>=<version>
apt-get install --reinstall <package>=<version>
apt-get install --reinstall <package>=<version>

Whats ignore-missing for: –ignore-missing – this command is run as ‘best effort’ – I don’t want the updating to stop because some packages are not available to reinstall (those will stay unmodified)

One thought on “LINUX INSTALL MISSING MAN PAGES

  1. E: Could not open lock file /var/lib/dpkg/lock – open (13: Permission denied)
    E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?

    This message is appeared after running command above

Leave a Reply

Your email address will not be published. Required fields are marked *