LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Debian: even after these steps, cannot install a package with Synaptic (https://www.linuxquestions.org/questions/linux-newbie-8/debian-even-after-these-steps-cannot-install-a-package-with-synaptic-4175630752/)

dedec0 05-30-2018 02:39 PM

Quote:

Originally Posted by hydrurga (Post 5861281)
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?

hydrurga 05-30-2018 03:31 PM

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/*}

dedec0 05-30-2018 06:40 PM

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?

(:

hydrurga 05-30-2018 06:54 PM

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)

dedec0 05-30-2018 08:06 PM

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.
/-:

pan64 05-31-2018 01:50 AM

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.

hydrurga 05-31-2018 02:14 AM

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.

dedec0 05-31-2018 01:57 PM

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.

pan64 05-31-2018 02:30 PM

probably some google on it?
https://askubuntu.com/questions/1880...ike-ii-rc-mean

hydrurga 05-31-2018 02:33 PM

"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}')

pan64 06-01-2018 01:11 AM

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}')

hydrurga 06-01-2018 02:34 AM

Quote:

Originally Posted by pan64 (Post 5862055)
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!

dedec0 08-19-2018 12:59 PM

Files to check when each package was touched are just "/var/log/dpkg.log*" ?
 
Quote:

Originally Posted by hydrurga (Post 5861857)
"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.?

dedec0 08-19-2018 01:02 PM

@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.

dedec0 08-19-2018 01:15 PM

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?


All times are GMT -5. The time now is 01:42 PM.