LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-30-2018, 02:39 PM   #16
dedec0
Senior Member
 
Registered: May 2007
Posts: 1,372

Original Poster
Rep: Reputation: 51
Smile


Quote:
Originally Posted by hydrurga View Post
If you want, we can go back to the basics, and start with:

Code:
sudo apt-get check

sudo dpkg --audit
Now I did read this:

Quote:
Originally Posted by man apt-get
Code:
        check
           check is a diagnostic tool; it updates the package cache and checks
           for broken dependencies.
I guess it is not needed? In synaptic, menu edit > "reload package data" did exactly that? And Synaptic do not let us install anything if there are broken packages.


Quote:
Originally Posted by man dpkg
Code:
[...]
-V, --verify [package-name...]
       Verifies the  integrity  of  package-name  or  all  packages  if
       omitted,  by comparing information from the files installed by a
       package with the files metadata information stored in  the  dpkg
       database  (since dpkg 1.17.2).  The origin of the files metadata
       information in the database is the binary  packages  themselves.
       That  metadata  gets collected at package unpack time during the
       installation process.

       Currently the only  functional  check  performed  is  an  md5sum
       verification  of  the  file contents against the stored value in
       the files database.  It will only get checked  if  the  database
       contains  the  file md5sum. To check for any missing metadata in
       the database, the --audit command can be used.

       The output format is selectable with the --verify-format option,
       which  by  default uses the rpm format, but that might change in
       the future, and as such, programs parsing  this  command  output
       should be explicit about the format they expect.

-C, --audit [package-name...]
       Performs database sanity and consistency checks for package-name
       or all packages  if  omitted  (per  package  checks  since  dpkg
       1.17.10).   For  example,  searches  for packages that have been
       installed only partially on your system or  that  have  missing,
       wrong  or obsolete control data or files. dpkg will suggest what
       to do with them to get them fixed.
[...]
Now I did both audit and verify with dpkg for all packages installed yesterday. Is the expected no output, if no problem found? I tried to find "verb" in 'man dpkg', not found. No option to force it being verbose?
 
Old 05-30-2018, 03:31 PM   #17
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
Yes, no error or warning output from either command is good. You should run both commands (dpkg: not for specific packages but for your whole system as it was given), whether you think you need to or not.

I don't know the equivalent in Synaptic because I don't use it, to be honest. I just wanted to check your package basics, given that you had experienced problems with the package manager's directories and the lock file.

Your software sources next?

Code:
cat /etc/apt/sources.list{,.d/*}
 
1 members found this post helpful.
Old 05-30-2018, 06:40 PM   #18
dedec0
Senior Member
 
Registered: May 2007
Posts: 1,372

Original Poster
Rep: Reputation: 51
Arrow

I thought so. That is good, but I wanted to confirm.

About your command, see some output from my terminal now. The command I used is inspired in yours:

Code:
me@here: /dev/shm
$  for i in /etc/apt/sources.list{,.d/*}; do \
    echo file: $i; cat $i; echo ====; done

file: /etc/apt/sources.list

# deb cdrom:[Debian GNU/Linux 9.0.0 _Stretch_ - Official amd64 
    NETINST 20170617-13:06]/ stretch main

#deb cdrom:[Debian GNU/Linux 9.0.0 _Stretch_ - Official amd64 
    NETINST 20170617-13:06]/ stretch main

# Mudanças feitas seguindo:
# "[...] - why 'apt-get update' cannot write tmp files? "
# LQ: /questions/showthread.php?p=5794018#post5793944

deb http://deb.debian.org/debian/ stretch main
#deb http://httpredir.debian.org/debian stretch main
deb-src http://deb.debian.org/debian/ stretch main
#deb-src http://httpredir.debian.org/debian stretch main


#deb http://security.debian.org/ stretch/updates main
#deb-src http://security.debian.org/ stretch/updates main

# stretch-updates, previously known as 'volatile'
deb http://deb.debian.org/debian/ stretch-updates main
#deb http://httpredir.debian.org/debian stretch-updates main
deb-src http://deb.debian.org/debian/ stretch-updates main
#deb-src http://httpredir.debian.org/debian stretch-updates main
====
file: /etc/apt/sources.list.d/skype-stable.list
deb [arch=amd64] https://repo.skype.com/deb stable main
====

me@here: /dev/shm
$
Some lines are commented because I changed them, sometime ago, discussing here a similar problem. A key post that I followed (according to my comment in the apt source file shown above, because I do not remember clearly today) then is:

(LQ Debian 9 (stretch) - why 'apt-get update' cannot write tmp files?)

Debian 9 - why 'apt-get update' cannot write tmp files?

(:
 
Old 05-30-2018, 06:54 PM   #19
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
Nice adaptation of the command. For interest, if you install inxi, then inxi -r produces a nice repository listing.

Referring to the example sources.list at https://wiki.debian.org/SourcesList#...e_sources.list: given that you have decided not to include the contrib and non-free repos, that you have decided to disable the debian-security updates (why is that, out of interest? - I would have thought those were important) and, very pedantically, that you don't need the forward slash at the end of the urls, e.g. http://deb.debian.org/debian, all appears to look normal.

So, on to the next stage: checking that all your packages are fully installed:

Code:
dpkg -l | grep -v "^ii"
(if there are no packages listed under the equals signs then all is good)
 
1 members found this post helpful.
Old 05-30-2018, 08:06 PM   #20
dedec0
Senior Member
 
Registered: May 2007
Posts: 1,372

Original Poster
Rep: Reputation: 51
Question

Forgot to say before! 'apt-get check' reported no problem - just the successful progress lines.

Another small comment, to use just one post: most of the time, I prefer Synaptic instead of aptitude (not so easy and fluid interface) or the apt/dpkg commands. And I am thinking about asking the question: " 'apt-get check' and/or 'dpkg --audit' are done automatically by Synaptic?" in its mailing list.

You are right. Updates are not important for me, but I enabled security repos. Indeed a silly idea of "who" commented that...

inxi... never heard that name. Less than 600KiB? I installed it. :D But the problem happened again, exactly like I said in #3. The package had no dependencies and was installed fine - apparently normally, since we found no problem since I started this thread, except the (before) absent partial folder. I repeated/done a few commands now:

Code:
sudoed@here /dev/shm
# dpkg --verify inxi

sudoed@here /dev/shm
# dpkg --audit inxi

sudoed@here /dev/shm
# apt-get check
Lendo listas de pacotes... Pronto
Construindo árvore de dependências       
Lendo informação de estado... Pronto

sudoed@here /dev/shm
#  ^D
'apt-get check' output is only the 3 normal lines it usually do. Reinstalling the package (from synaptic) again *repeated* the error! That is very strange for me... the problem should have stopped.
/-:
 
Old 05-31-2018, 01:50 AM   #21
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 22,047

Rep: Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348
I do not understand you. in post #3 you explained the following:
Quote:
W: Download is performed unsandboxed as root as file '/var/cache/apt/archives/partial/libqt5printsupport5_5.7.1+dfsg-3+b1_amd64.deb' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permissão negada)
The solution is to make it available for the user _apt.
This problem is not related to the apt database and package consistency at all, therefore the commands posted/tried will not address it.
Actually I don't know what permission is missing from where (if the download was successful but the result was unreadable, or it was not downloaded at all).
The missing dir /var/cache/apt/archives/partial is a clear sign: your installation (at least the apt related structure) is corrupted, damaged. This may cause a huge amount of different and diverse error messages. I don't know how serious is it and if there was any way to find and fix all of these failures. apt itself will not able to detect them (it assumes the system was properly installed). By the way reinstalling apt (with dpkg) may help.
 
Old 05-31-2018, 02:14 AM   #22
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
Until we've finished checking your system, you shouln't be using Synaptic. We're only half-way through. We will probably end up reinstalling Synaptic manually anyway (and, if necessary, apt etc. as pan64 mentions).

So, with that in mind, if you could run the command in post #19, that would be great.
 
Old 05-31-2018, 01:57 PM   #23
dedec0
Senior Member
 
Registered: May 2007
Posts: 1,372

Original Poster
Rep: Reputation: 51
Question dpkg -l | grep -v "^ii"

Command output:

Code:
$ dpkg -l | grep -v "^ii"

Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Nome                                  Versão                            Arquitectura Descrição
+++-=====================================-=================================-============-===============================================================================
rc  ffmpeg                                7:3.2.5-1                         amd64        Tools for transcoding, streaming and playing of multimedia files
rc  gstreamer0.10-plugins-good:amd64      0.10.31-3+nmu1ubuntu5.3           amd64        GStreamer plugins from the "good" set
rc  libqt3-mt                             3:3.3.8-e-0debian7.0.0+0          amd64        Qt GUI Library (Threaded runtime version), Version 3
rc  libvdpau-va-gl1:amd64                 0.4.2-1                           amd64        VDPAU driver with OpenGL/VAAPI backend
rc  opera                                 11.64.1403                        amd64        Fast and secure web browser and Internet suite
rc  pulseaudio                            10.0-1                            amd64        PulseAudio sound server
rc  rtkit                                 0.11-4+b1                         amd64        Realtime Policy and Watchdog Daemon

$
What 'ii' and 'rc' mean? There are a few lines... but it is not clear. Also, 'man dpkg' does not explain its listing.
 
Old 05-31-2018, 02:30 PM   #24
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 22,047

Rep: Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348
probably some google on it?
https://askubuntu.com/questions/1880...ike-ii-rc-mean
 
Old 05-31-2018, 02:33 PM   #25
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
"rc" means that you have removed a package but have not yet purged its residual configuration.

Which leads me to the question, why have you deleted pulseaudio and ffmpeg - did you have specific problems? I would expect these two packages to be present on a normal Mint/Ubuntu system, and perhaps a Debian one too (although I don't know much about Debian so can't be sure).

If these have been deleted intentionally, then we can continue with the purging of the packages. Either you can do this manually, one by one, with:

Code:
sudo apt-get purge package_name
or, to make things easier (but do check the list of packages before proceeding):

Code:
sudo apt-get purge $(dpkg -l | grep '^rc' | awk '{print $2}')
 
1 members found this post helpful.
Old 06-01-2018, 01:11 AM   #26
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 22,047

Rep: Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348
sorry guy, it is out of topic here, but do not need to use grep:
Code:
sudo apt-get purge $(dpkg -l | awk '/^rc/ {print $2}')
 
2 members found this post helpful.
Old 06-01-2018, 02:34 AM   #27
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
Quote:
Originally Posted by pan64 View Post
sorry guy, it is out of topic here, but do not need to use grep:
Code:
sudo apt-get purge $(dpkg -l | awk '/^rc/ {print $2}')
Off-topic it may be, but you've just improved my command line toolbox. Cheers!
 
Old 08-19-2018, 12:59 PM   #28
dedec0
Senior Member
 
Registered: May 2007
Posts: 1,372

Original Poster
Rep: Reputation: 51
Question Files to check when each package was touched are just "/var/log/dpkg.log*" ?

Quote:
Originally Posted by hydrurga View Post
"rc" means that you have removed a package but have not yet purged its residual configuration.

Which leads me to the question, why have you deleted pulseaudio and ffmpeg - did you have specific problems? I would expect these two packages to be present on a normal Mint/Ubuntu system, and perhaps a Debian one too (although I don't know much about Debian so can't be sure).

If these have been deleted intentionally, then we can continue with the purging of the packages. Either you can do this manually, one by one, with:

Code:
sudo apt-get purge package_name
or, to make things easier (but do check the list of packages before proceeding):

Code:
sudo apt-get purge $(dpkg -l | grep '^rc' | awk '{print $2}')
Sorry. I did let this thread several weeks needing attention.

I had not deleted or uninstalled those packages. The strangest thing, and probably the only one related to installed programs and packages, that happened to my computer is that I installed skype for linux in it. Without the dependencies being clearly pointed before installing (id est, they were not mentioned in the official page where I downloaded the installed package from). After installing it, I noted that several things, that I did not have, were installed. Wine is one - this is why I think that what I run today is the same that win users run.

I need examine my systems logs to point exactly which packages were added before (a few minutes, at most) skype was first installed.

Thank you also for saying what 'rc' in that context means. "residual configuration" -> So it is not as bad as I imagined from what you all said. Do any of you reading here think that this information (and others related) should be added to the dpkg documentation? A new bug report for that is a good idea?

I want to find what happened to uninstall packages. In the last week, I was about to install [something] and aptitude said that several packages needed to be updated. I found that very strange!

The files I need to look to check when each package I have were installed or removed are just "/var/log/dpkg.log*" ? Do those include all things installed in every possible ways, like synaptic, aptitude, etc.?

Last edited by dedec0; 08-19-2018 at 01:05 PM.
 
Old 08-19-2018, 01:02 PM   #29
dedec0
Senior Member
 
Registered: May 2007
Posts: 1,372

Original Poster
Rep: Reputation: 51
@pan64 in #24: I did try to find the answer before posting here

@pan64 in #24: I did try to find the answer before posting here.

And I will write free ads just to search engines with good principles.

Last edited by dedec0; 08-19-2018 at 01:40 PM.
 
Old 08-19-2018, 01:15 PM   #30
dedec0
Senior Member
 
Registered: May 2007
Posts: 1,372

Original Poster
Rep: Reputation: 51
Question Offtopic question: awk '/^rc/' will accept which regexes?

Offtopic question:

The command

awk '/^rc/'

will accept any regex between the slashes?

Which regex standard (or type)? I am thinking about the categories of regexes that grep uses, depending on a few switches it has.

Since a single quote was used for the command above, no escaping should be needed for any kind of symbols. Right?
 
  


Reply

Tags
debian repository



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Synaptic: How do I know what package(s) to install? kathbeau Linux - Newbie 2 11-20-2014 11:39 AM
[SOLVED] Debian 6.0.1a i686 debian synaptic package manager Faithfully10 Debian 2 05-23-2011 05:35 PM
What are the steps to build and install a Slackware package from a RPM package? sudeepkulkarni Slackware 6 04-25-2011 12:51 PM
Debian Synaptic Package Manager error: xserver-xorg stripped craig61107 Linux - Newbie 1 02-10-2011 07:15 AM
debian etch 4.0 synaptic package manager bloodyscript Linux - Software 4 07-11-2007 02:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:16 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration