Tips: Arch Linux: How to resolve “error: duplicated database entry ” ” error message


Follow the below steps to resolve the issue,

check for versions in local folder

ls /var/lib/pacman/local/ | grep <pkgname>

You should see more then one version mentioned as below

bashank@mayapc1 pkg]$ ls /var/lib/pacman/local/ | grep
bash-4.3.024-1
bash-4.3.027-0.1

now delete (or move them out of local folder) all the older versions from local folder

rm -rf /var/lib/pacman/local/<old_package>

example:

rm -rf /var/lib/pacman/local/bash-4.3.024-1

RPM Interview Questions


Q: How to install packages with all the dependency packages if all the packages are available at a common repository?
Ans : rpm –ivh  –aid packagename.

Q: How to check, where a particular package installed it’s configuration files.
Ans : rpm –qc packagename.

Q: How to check the change log of the installed package.
Ans : rpm -q –changelog packagename.

Q: How to check, where a particular package installed it’s doc files.
Ans : rpm -qd packagenme

Q: How to check all the files installed by package?
Ans : rpm -q –filesbypkg packagename

Q: How to check the version of files installed by a package
Ans : rpm -qi packagename

Q: How to check the dependencies for a particular packages i.e. Required libraries packages etc.
Ans : rpm -q -R packagename.

Q: How to upgrade the packages which are already installed on to the linux box.
Ans : rpm -F install options packagename.

Q: What is the command to update only the rpm database.
Ans : rpm -i –justdb packagename

Q: What is the command to check whether a particular package installation would be successful but would not actually install the package.
Ans : rpm -ivh –test packagename

Q: How to check that a particular file belong to which package
Ans : rpm -qf filename

Q: How to list files in  a package
Ans : rpm -ql packagename

Q: How to verify whether the files installed by package are intact or been tampered/corrupted.
Ans : rpm -qs packagename

Q: What is the command to create a new RPM Database
Ans : rpm –initdb

Q: What is the command to rebuild the RPM Database
Ans : rpm –rebuilddb

PitHole: RPM : “warning, user XXX does not exist – using root”


If while installing rpm package following error occurs
warning: user XXX does not exist – using root

Issue : I’m trying to build/install an rpm and it keeps giving me these warnings while installing the binary. Though I heard this could be safely ignored as its bcos there is no user XXX on my box, was wondering if there is a way to supress this in the rpm spec file itself. I know I could also manually build it as root. But curious if we could supress this from the spec.

Resolution:

Add the following in the spec file and recompile the spec file

%defattr(-,root,root)

Another Downloader… batch downloader ….


The script can be used to batch download the files from the internet. say for example the website contain files from 1.zip to 100.zip at

http://www.something.com/zipfiles/ folder. then the download command will be

AnotherDownloader.py http://www.something.com/zipfiles/*.zip 1 100 /home/test/download

the above command will download the files to /home/test/download folder.

AnotherDownloader.pdf

Display Video in VLC when using compiz is enabled.


For some reason, when compiz is running VLC does not show any video. I found the work around to the issue by following the below instructions

  1. Start VLC and click on Settings -> Preferences.
  2. Expand Video -> Output modules.
  3. Select Output modules, and check the  checkbox at the bottom right that says Advanced options.
  4. Select the option to select a different output device. Pick X11 video output, click on Save.

Setting Evolution for Gmail Account


Steps to follow

  1. Enable the POP & SMTP service on gmail accont.
  2. Start Evolution
  3. Add New Account by clicking “Edit” -> “Preference”
  4. In “Accout Details”, press “Add” Button
  5. Select “Forward”
  6. Enter your Account Name and Email ID and select “Forward”
  7. Select “POP” server for “Receiving Email”
  8. Under “Configuration” section enter “POP.gmail.com” and your email username
  9. Under “Security” select “SSL encryption
  10. Under “Authentication Type” select Password
  11. Select “Forward”
  12. Select “Forward” for “Receiving Options
  13. In “Sending Email” select
    1. Server Type : SMTP
    2. Under “Server Configureation” add “SMTP.GMAIL.COM” for Server
    3. Under “Security” select “SSL Encryption” as “Use Secure Connection”
    4. Enter Username under Authentication section.
  14. Select “Forward”

Slackware: Enabling package update through online mirrors


Unfortunately Slackware 12.0 does not unable update of OS by default, slackpkg needs to be installed from the install CD/DVD which is located in “extra\slackpkg” folder.

installpkg slackpkg*.tgz

uncomment only one mirror on /etc/slackpkg/mirrors file which represent your version.

slackpkg update; slackpkg upgrade-all

the above command will upgrade your machine.

mp3 to ogg


1. apt-get install mpg321 vorbis-tools (If you don’t have them on your machine)
Note: If you get error, check that you have contrib and non-free depositories in your sources list

2.Code: mpg321 input.mp3 -w raw && oggenc raw -o output.ogg
Note: raw is just a file name, it could be anything you want…