Any way to make apt ignore dpkg status file?

2022-07-08 Thread Tim Woodall

Hi

$ APT_CONFIG=../apt/apt.conf.buster.amd64 apt-cache policy dpkg
dpkg:
  Installed: 1.20.10
  Candidate: 1.20.10
  Version table:
 *** 1.20.10 100
100 /var/lib/dpkg/status
 1.19.8 500
500 http://aptmirror17.home.woodall.me.uk/local buster/essential amd64 
Packages

Is there any way to make this not see the installed version other than
by using -o RootDir?

Tim.



Re: ALSA pcm problem

2022-07-08 Thread Dan Ritter
Thomas George wrote: 
> 
> On 7/8/22 5:57 PM, Dan Ritter wrote:
> > Thomas George wrote:
> > > speaker-test fails
> > > 
> > > strace speaker-test finds "open /dev/snd/pcmC0D0" No such file or 
> > > directory
> > 
> > What's the output of aplay -L ?
> > 
> > Have you tried specifiying one of those devices for
> > speaker-test?
> > 
> > Has this ever worked before? If so, when did it stop?
> > 
> My sound system worked normally until yesterday using both the onboard
> starship card and HDMI.  Then the output from the onboard card to line out
> to the external speakers failed. Still HDMI sound.
> 
> Trying to trouble shoot this I ran alsa nreset which did not report any
> problem, then tried speaker-test which failed
> 
> Here is the output of mplay -L
> 

...
> hw:CARD=Generic,DEV=0
> HD-Audio Generic, ALCS1200A Analog
> Direct hardware device without any conversions
> plughw:CARD=Generic,DEV=0
> HD-Audio Generic, ALCS1200A Analog
> Hardware device with all software conversions
> default:CARD=Generic
> HD-Audio Generic, ALCS1200A Analog
> Default Audio Device
> sysdefault:CARD=Generic
> HD-Audio Generic, ALCS1200A Analog
> Default Audio Device
> front:CARD=Generic,DEV=0
> HD-Audio Generic, ALCS1200A Analog
> Front output / input
> dmix:CARD=Generic,DEV=0
> HD-Audio Generic, ALCS1200A Analog
> Direct sample mixing device
> dmix:CARD=Generic,DEV=1
> HD-Audio Generic, ALCS1200A Digital
> Direct sample mixing device
...

Now try 

speaker-test -C2 -Dhw:Generic
speaker-test -C2 -Dfront:Generic

and so on to see if you get output that way.

Also check the mixing levels with alsamixer; accidental muting
happens.

-dsr-




Re: Is there an easy way to get the latest version number of a source package that is available?

2022-07-08 Thread Tim Woodall

On Mon, 27 Jun 2022, Roberto C. S?nchez wrote:


On Mon, Jun 27, 2022 at 10:44:25PM +0100, Tim Woodall wrote:

On Mon, 27 Jun 2022, Roberto C. S?nchez wrote:


On Mon, Jun 27, 2022 at 03:31:01PM +0100, Tim Woodall wrote:

Hi,

apt-get --only-source --download-only source 

will download the latest version of the source package.

Is there a one liner that will give me the version of the package
(including the epoch) without downloading the package and parsing the
dsc?


If you are not opposed to installing the devscripts package, then you
can do this:

$ rmadison -u debian -a source -s unstable firefox-esr
firefox-esr | 91.10.0esr-1  | unstable   | source




The usefulness of 'apt-cache madison' versus 'rmadison' depends on what
you mean by "lastest available version".  If you mean "latest available
version from the sources configured on my system", then 'apt-cache
madison' will do just that.  If you mean "latest available version in
the Debian archive", then you need 'rmadison'.



This was really useful, thank you. In the end I stuck with my previous
apt-cache showsrc parsing but apt-cache madison has just made it really
easy to track down a bug where that wasn't working (because of a
copy-pasta error that meant I had Suite: bullseye configured instead of
buster but only for the debsrc (and not for security updates which was
correct)



Re: ALSA pcm problem

2022-07-08 Thread Dan Ritter
Thomas George wrote: 
> speaker-test fails
> 
> strace speaker-test finds "open /dev/snd/pcmC0D0" No such file or directory


What's the output of aplay -L ?

Have you tried specifiying one of those devices for
speaker-test?

Has this ever worked before? If so, when did it stop?

-dsr-



Re: Howto convert from blu-ray to usb-stick?

2022-07-08 Thread Thomas Schmitt
Hi,

Øyvind Hagen wrote:
> I have first edition of Debian 9.
> I want to convert from Blu-rays to USB-stics to take care of content

I try to understand your situation. Two theories come to me
(if none matches your situation, then please explain it more verbosely):

---

1: You are running Debian 9 and have some mountable Blu-rays (Debian or
   not) and want to make backups on USB sticks.

Make room on the USB sticks so that they can take all the data from the
Blu-rays. Then mount one Blu-ray after the other and copy its files to
one or more of the USB sticks.
Use for copying whatever program you are accustomed too.

---

2: You have Debian Blu-ray media and want to copy them to USB sticks
   which shall work like the Blu-rays.

Copy the plain data on the Blu-rays plainly to the respective USB sticks.

E.g. with a Blu-ray in drive /dev/sr0 and a USB stick at /dev/sdX

  sudo dd if=/dev/sr0 bs=1M of=/dev/sdX
  sync

The first USB stick will boot and provide a Debian package repository
out of the box.
For using the other USB sticks as additional repositories, you will
probably have to mention them in
  /etc/apt/sources.list
of the freshly installed base system.
Others on this mailing list are probably more qualified to describe
what is needed for this.

If you have a USB stick which can take the files of all three ISOs
(~ 70 GiB), you could become test pilot for
  
https://dev.lovelyhq.com/libburnia/libisoburn/raw/branch/master/test/merge_debian_isos
which is my proposal to resolve
  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1011343
  "WISHLIST: Offical ALL-IN-ONE images?"

(You'd copy the Blu-rays as images to hard disk, run the script, and get
an all-in-one ISO which you put onto the USB stick as described here.
Give me a note if you are interested in details.)

---
General warning:

Being superuser and copying plainly to a /dev/sdX is somewhat dangerous.
One wrong character in the device name and one of your SATA disks gets
overwritten by the ISO. (Lucky are those who only have /dev/nvme*
disks.)

Ubuntu advises Balena Etcher for safer copying. But i don't know whether
it would accept /dev/sr0 as input.

I myself would use my own offer to avoid shooting anybody's foot:

  xorriso-dd-target -with_sudo -plug_test -DO_WRITE -image_file /dev/sr0

See
  https://wiki.debian.org/XorrisoDdTarget
It will refuse to overwrite USB sticks which already hold other filesystems
than ISO 9660 or FAT. But it can make proposals for commands which you
may perform manually to get the job done. See
  
https://wiki.debian.org/XorrisoDdTarget#How_to_overwrite_a_drive_against_the_will_of_xorriso-dd-target

---

> and also the USB-stick do not making damaging of the disc.

Do you fear to damage the Blu-ray media by reading them ?

Unless it's a Pioneer BDR-S09 drive and Verbatim BD-RE media, i see no such
risk. (Said combination is good for a dozen full reads at 10x BD speed
before the BD-RE medium gets cracks at the inner hole. After a few more runs
the BD-RE becomes unreadable.)


Have a nice day :)

Thomas



Re: Setting up Mailman3 under Debian (using packages)

2022-07-08 Thread Matthias Scheler


Hello,

[Sorry for the delayed response. I only got around to try this out now.]

On Fri, Jul 01, 2022 at 09:35:33PM +0200, Pierre-Elliott Bécue wrote:
> > Using the Debian 10 packages I can get to a point where the web interface
> > is up and running and I get to a login prompt. But I have no idea how
> > to setup the admin account or how to change the admin password if
> > an admin account has automatically been created.
> >
> > Any advise would be appreciated.
> >
> > Thanks in advance
> 
> The web UI is a django application. During the installation of the
> mailman3-web package, you should have been prompted to give the
> postorius superuser password.

That doesn't happen on my system. I've completely wiped any traces
of Djano (including config) and installed "mailman3-full" which
also installed "mailman3-web". I got prompted twice for the database
that I want to use (I chose "sqlite" both times) but I was never
asked for a super password.

And the "python3-django-postorius" definitely got installed:

Setting up python3-django-mailman3 (1.2.0-3) ...
Setting up python3-django-postorius (1.2.4-1+deb10u1) ...
Setting up python3-django-hyperkitty (1.2.2-1+deb10u1) ...
Setting up mailman3-web (0+20180916-8) ...
dbconfig-common: writing config to 
/etc/dbconfig-common/mailman3-web.conf

> If you have deactivated debconf or provided an empty password, then no
> superuser has been created.

I've not deactivated "debconf" as the prompts for the database prove.
But there is no prompt for the super user password.

> In that case, you can use django-admin binary command to set a superuser
> password.
> 
> See /usr/share/doc/mailman3-web/README.Debian.gz for more intel.

Running "dpkg-reconfigure mailman3-web" manually gave me the dialog
for setting up the Postorius admin user.

Kind regards

-- 
Matthias Scheler  http://zhadum.org.uk/



Re: bash: which: command not found? + (E: Unable to locate package which? ...)

2022-07-08 Thread tomas
On Fri, Jul 08, 2022 at 08:37:19AM -0500, Albretch Mueller wrote:

> [...] that bash utils needed to be declared in
> the PATH in order for you to access them. Noticing it and opening
> another windows was all it took.

Ah, oh. You overwrote your PATH. Makes sense now :)

>  it amazes me also how all we do, learn, even dream, as well as our
> mistakes and how we notice them we do -functionally-

Indeed.

Cheers
-- 
t


signature.asc
Description: PGP signature


Howto convert from blu-ray to usb-stick?

2022-07-08 Thread Øyvind Hagen
Hi to Debian.

I have first edition of Debian 9. I want to convert from Blu-rays to
USB-stics to take care of content and also the USB-stick do not making
damaging of the disc. I have tried to understand the content of some
console help descriptions to convert, copy, burning to iso but I did not
understand yet how to use.

Can you help me?

Written by Øyvind Hagen.


Re: bash: which: command not found? + (E: Unable to locate package which? ...)

2022-07-08 Thread Tixy
On Fri, 2022-07-08 at 08:37 -0500, Albretch Mueller wrote:
> it seemed to have been somehow
> blanketed by my "unconscious" that bash utils needed to be declared in
> the PATH in order for you to access them.

'which' isn't a 'bash util' whatever that is (presumably you mean a
shell built-in). As you've found out, 'which' is an external program.

To find out how the shell thinks about out a command, use the 'type'
command...

$ type which
which is /usr/bin/which

$ type type
type is a shell builtin

$ type foobar
bash: type: foobar: not found

$ type which
which is hashed (/usr/bin/which)

In the last, 'hashed' sorta means 'cached' so it doesn't have to search
the whole path again to find it. From the posix standard [1]...

   an implementation may remember its location and need not search for the
   utility again unless the PATH variable has been the subject of an
   assignment. If the remembered location fails for a subsequent
   invocation, the shell shall repeat the search to find the new location
   for the utility, if any.

[1] 
https://pubs.opengroup.org/onlinepubs/9699919799.2018edition/utilities/V3_chap02.html#tag_18_09_01_01

-- 
Tixy



Re: bash: which: command not found? + (E: Unable to locate package which? ...)

2022-07-08 Thread Albretch Mueller
 after reading through all your suggestions and still wondering about
what exactly was the mistake that I had made, I realized that it was a
simple and stupid "type in a rush and let 'the compiler' (sorry!) find
the mistake for you" kind of error: it seemed to have been somehow
blanketed by my "unconscious" that bash utils needed to be declared in
the PATH in order for you to access them. Noticing it and opening
another windows was all it took.

$ export _GRAALVM_HOME=".../GraalVM/graalvm-ce-java17-22.1.0"
$ export PATH=${_GRAALVM_HOME}/bin:${PATH}

$ which javac
.../GraalVM/graalvm-ce-java17-22.1.0/bin/javac

$ which java
.../GraalVM/graalvm-ce-java17-22.1.0/bin/java

$ javac -version
javac 17.0.3

$ java -version
openjdk version "17.0.3" 2022-04-19
OpenJDK Runtime Environment GraalVM CE 22.1.0 (build 17.0.3+7-jvmci-22.1-b06)
OpenJDK 64-Bit Server VM GraalVM CE 22.1.0 (build
17.0.3+7-jvmci-22.1-b06, mixed mode, sharing)
$


 "So far as these truths are concerned, I do not at all fear the
arguments of the Academics when they say, What if you are mistaken?
For if I am mistaken, I exist." Saint Augustine (De Civitate Dei (book
XI, 26))

 it amazes me also how all we do, learn, even dream, as well as our
mistakes and how we notice them we do -functionally-

 thank you to you all,
 lbrtchx



Re: bash: which: command not found? + (E: Unable to locate package which? ...)

2022-07-08 Thread mick crane

On 2022-07-08 12:48, Greg Wooledge wrote:

https://wiki.debian.org/DebianAlternatives


thanks

mick



Re: bash: which: command not found? + (E: Unable to locate package which? ...)

2022-07-08 Thread Greg Wooledge
On Fri, Jul 08, 2022 at 05:02:47AM -0500, Albretch Mueller wrote:
>  Actually, I just noticed I couldn't run "cat" as regular user but I
> could as root

My first guess: you broke your PATH variable, and however you're becoming
root (there are many ways, so it would be nice if you told us which one
you're using) is restoring a sensible PATH for you.

> how could that form a "multiversing" be -technically-
> happening (other than having forces actively messing with your work)?

You're delusional.

If you need any additional help (beyond what has already been provided)
in fixing your "couldn't run cat" problem, please follow these basic
guidelines when asking for help:

1) Show us the problem.  "I couldn't run cat" is about a 2 out of 10 on
   the usefulness scale.

   A much better start would be to *paste* the relevant lines (whole lines)
   from your terminal session into the email.  What you paste should show
   us your shell prompt, the shell command that you typed, and all of the
   output you received.  For example:

   unicorn:~$ catt /etc/group
   bash: catt: command not found

2) Give us basic background about your system.  What version of Debian are
   you running?  What, if anything, have you changed which might have an
   effect on the problem you're experiencing?

   Since you're having a problem running a standard shell command, things
   that might fall into this category would include:

   * I changed my account's shell from ___ to ___.
   * I edited my ~/.bashrc (or ~/.zshrc or whatever) dot file.
   * I tried to upgrade from buster to bookworm, and I got errors, but I
 ignored them until now.

3) Tell us what, if anything, you've already tried.  Give us all the
   additional details you have.

   * The problem happens in all terminals I've tried -- xterm, rxvt-unicode,
 gnome-terminal and konsole.
   * If I type 'zsh' the problem goes away.  But I really want it to work
 in bash too.
   * I did a 'locate cat' and I can see that it's in /usr/bin, or at least
 locate thinks it is.  Here is the output of 'ls -l /usr/bin/cat'.



Re: bash: which: command not found? + (E: Unable to locate package which? ...)

2022-07-08 Thread The Wanderer
On 2022-07-08 at 07:48, Greg Wooledge wrote:

> On Fri, Jul 08, 2022 at 12:47:19PM +0100, mick crane wrote:
>
>> here on bookworm
>> mick@pumpkin:~$ ls -la /usr/bin |grep which
>> lrwxrwxrwx  1 root root  23 Jan 23 18:05 which ->
>> /etc/alternatives/which
>> -rwxr-xr-x  1 root root 946 May  1 17:47 which.debianutils
>> mick@pumpkin:~$
>> 
>> what are these "alternatives" ?
> 
> https://wiki.debian.org/DebianAlternatives

There's also

/etc/alternatives/README

which points you to the update-alternatives(1) man page, which provides
a reasonable level of documentation of the concept.

(Though I'll admit that that README may be a bit hard to notice, among
the many other items in that directory.)

-- 
   The Wanderer

The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all
progress depends on the unreasonable man. -- George Bernard Shaw



signature.asc
Description: OpenPGP digital signature


Re: bash: which: command not found? + (E: Unable to locate package which? ...)

2022-07-08 Thread Greg Wooledge
On Fri, Jul 08, 2022 at 12:47:19PM +0100, mick crane wrote:
> here on bookworm
> mick@pumpkin:~$ ls -la /usr/bin |grep which
> lrwxrwxrwx  1 root root  23 Jan 23 18:05 which ->
> /etc/alternatives/which
> -rwxr-xr-x  1 root root 946 May  1 17:47 which.debianutils
> mick@pumpkin:~$
> 
> what are these "alternatives" ?

https://wiki.debian.org/DebianAlternatives



Re: Bug 895378 has been fixed on Ubuntu, will it get to Debian?

2022-07-08 Thread Richmond
Richmond  writes:

> This bug:
>
> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=895378
>
> sky2: sky2: did not recover correctly after waking up from S3
>
> seems to be fixed on Ubuntu here:
>
> https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1798921
>
> Will this fix get to Debian? I guess it will go up to kernel maintainers
> and down again but I don't know how this works.

Fixed with this kernel command line parameter:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash sky2.disable_msi=1"

in file /etc/default/grub

run:

update-grub



Re: bash: which: command not found? + (E: Unable to locate package which? ...)

2022-07-08 Thread mick crane

On 2022-07-08 11:30, to...@tuxteam.de wrote:


Not every binary is contained in a package called like it.
That's what "apt-file" is for (in the same named package):

tomas@trotzki:~$ apt-file search bin/which
debian-goodies: /usr/bin/which-pkg-broke
debian-goodies: /usr/bin/which-pkg-broke-build
debianutils: /usr/bin/which
emboss: /usr/bin/whichdb
whichman: /usr/bin/whichman


here on bookworm
mick@pumpkin:~$ ls -la /usr/bin |grep which
lrwxrwxrwx  1 root root  23 Jan 23 18:05 which -> 
/etc/alternatives/which

-rwxr-xr-x  1 root root 946 May  1 17:47 which.debianutils
mick@pumpkin:~$

what are these "alternatives" ?

mick



Re: bash: which: command not found? + (E: Unable to locate package which? ...)

2022-07-08 Thread The Wanderer
On 2022-07-08 at 06:02, Albretch Mueller wrote:

>  Actually, I just noticed I couldn't run "cat" as regular user but I
> could as root how could that form a "multiversing" be -technically-
> happening (other than having forces actively messing with your work)?

I don't understand what this means, and I don't recognize this use of
"multiversing". (At a guess, I'd parse that verb as meaning something
like "splitting into multiple universes", which seems completely
unrelated to this context.)

I also don't see what that has to do with anything else that's in this
message.

> export _GRAALVM_HOME=.../graalvm-ce-java17-22.1.0
> export PATH=${PATH}:${_GRAALVM_HOME}/bin
> which javac
> which java
> $
> 
> bash: which: command not found
> 
> # apt-get install which
> Reading package lists... Done
> Building dependency tree... Done
> Reading state information... Done
> E: Unable to locate package which
> #

Currently, which is (still) provided by the 'debianutils' package.

There's a whole flap about that; the package maintainer doesn't think it
belongs there and doesn't want to keep maintaining it and apparently
wants to declare it deprecated in favor of the (not 100% comparable)
'command -v'. Other people dispute that, to some degree or another, and
there has been *far* more discussion of it than the whole thing would
seem to have deserved.

You can see reference to the bug reports involved in
/usr/share/doc/debianutils/changelog.Debian.gz, at least if you're
running the version that's in testing or newer.

I think the idea is that eventually there will (probably) be multiple
implementations of which provided by multiple packages, and you can
install and use whichever one you want via the Debian alternatives
system. But for the time being, the debianutils version seems to still
be the only one available, at least in testing.

-- 
   The Wanderer

The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all
progress depends on the unreasonable man. -- George Bernard Shaw



signature.asc
Description: OpenPGP digital signature


Re: bash: which: command not found? + (E: Unable to locate package which? ...)

2022-07-08 Thread Tixy
On Fri, 2022-07-08 at 05:02 -0500, Albretch Mueller wrote:
>  Actually, I just noticed I couldn't run "cat" as regular user but I
> could as root how could that form a "multiversing" be -technically-
> happening (other than having forces actively messing with your work)?
> 
> export _GRAALVM_HOME=.../graalvm-ce-java17-22.1.0

There's one too many '.' characters there, but that shouldn't be the
cause of your issue.

> export PATH=${PATH}:${_GRAALVM_HOME}/bin
> which javac
> which java
> $
> 
> bash: which: command not found

So, did you check what $PATH contains? (e.g. echo $PATH) It seems
likely it's corrupted or missing the right directory (/usr/bin see
below).

> 
> # apt-get install which
> Reading package lists... Done
> Building dependency tree... Done
> Reading state information... Done
> E: Unable to locate package which

Because there's no package called 'which', the which command is
provided by debianutils. Which you could have found by Googling for the
ways to find out the package. For me, the first search result was...
https://superuser.com/questions/10997/find-what-package-a-file-belongs-to-in-ubuntu-debian

[...]


# which bash
/usr/bin/bash

So, $PATH in your root environment is OK. So you could have run

#which which
/usr/bin/which

So it's in /usr/bin and you could have found the package it belongs with using:

#dpkg -S /usr/bin/which
debianutils: /usr/bin/which

-- 
Tixy



Re: bash: which: command not found? + (E: Unable to locate package which? ...)

2022-07-08 Thread Jude DaShiell
If using bash, likely the type command will work.


On Fri, 8 Jul 2022, Albretch Mueller wrote:

>  Actually, I just noticed I couldn't run "cat" as regular user but I
> could as root how could that form a "multiversing" be -technically-
> happening (other than having forces actively messing with your work)?
>
> export _GRAALVM_HOME=.../graalvm-ce-java17-22.1.0
> export PATH=${PATH}:${_GRAALVM_HOME}/bin
> which javac
> which java
> $
>
> bash: which: command not found
>
> # apt-get install which
> Reading package lists... Done
> Building dependency tree... Done
> Reading state information... Done
> E: Unable to locate package which
> #
>
>
>
> # cat /etc/apt/sources.list
> # deb cdrom:[Official Debian GNU/Linux Live 11.2.0 lxde
> 2021-12-18T12:41]/ bullseye main
> #deb cdrom:[Official Debian GNU/Linux Live 11.2.0 lxde
> 2021-12-18T12:41]/ bullseye main
>
> deb http://security.debian.org/debian-security bullseye-security main
> deb-src http://security.debian.org/debian-security bullseye-security main
>
> # bullseye-updates, to get updates before a point release is made;
> # see 
> https://www.debian.org/doc/manuals/debian-reference/ch02.en.html#_updates_and_backports
> # A network mirror was not selected during install.  The following entries
> # are provided as examples, but you should amend them as appropriate
> # for your mirror of choice.
> #
> deb http://deb.debian.org/debian/ bullseye-updates main
> deb-src http://deb.debian.org/debian/ bullseye-updates main
>
> deb http://deb.debian.org/debian bullseye main contrib non-free
> deb-src http://deb.debian.org/debian bullseye main contrib non-free
>
> deb http://deb.debian.org/debian-security/ bullseye-security main
> contrib non-free
> deb-src http://deb.debian.org/debian-security/ bullseye-security main
> contrib non-free
>
> deb http://deb.debian.org/debian bullseye-updates main contrib non-free
> deb-src http://deb.debian.org/debian bullseye-updates main contrib non-free
>
> #This system was installed using small removable media
> # (e.g. netinst, live or single CD). The matching "deb cdrom"
> # entries were disabled at the end of the installation process.
> # For information about how to configure apt package sources,
> # see the sources.list(5) manual.
>
> # which bash
> /usr/bin/bash
> #
>
>



Re: bash: which: command not found? + (E: Unable to locate package which? ...)

2022-07-08 Thread tomas
On Fri, Jul 08, 2022 at 05:02:47AM -0500, Albretch Mueller wrote:
>  Actually, I just noticed I couldn't run "cat" as regular user but I
> could as root how could that form a "multiversing" be -technically-
> happening (other than having forces actively messing with your work)?

Sorry. I don't understand what you are saying there. What does mean
"you couldn't run cat"? Your fingers froze while typing? Your keyboard
delivered an electric jolt to you? Help your helpers. Don't tease them
with riddles.

> export _GRAALVM_HOME=.../graalvm-ce-java17-22.1.0
> export PATH=${PATH}:${_GRAALVM_HOME}/bin
> which javac
> which java
> $
> 
> bash: which: command not found
> 
> # apt-get install which
> Reading package lists... Done
> Building dependency tree... Done
> Reading state information... Done
> E: Unable to locate package which
> #

[...]

Not every binary is contained in a package called like it.
That's what "apt-file" is for (in the same named package):

tomas@trotzki:~$ apt-file search bin/which
debian-goodies: /usr/bin/which-pkg-broke  
debian-goodies: /usr/bin/which-pkg-broke-build
debianutils: /usr/bin/which
emboss: /usr/bin/whichdb
whichman: /usr/bin/whichman

...i provided more of the path ("bin/which") because I'd
otherwise get too many hits.

It seems you're looking for the package "debianutils".

(NB: "apt", not "apt-get" has an interface to "apt-file"
so you can just type "apt search").

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: bash: which: command not found? + (E: Unable to locate package which? ...)

2022-07-08 Thread Loïc Grenié
On Fri 8 Jul 2022 at 12:03, Albretch Mueller wrote:

>  Actually, I just noticed I couldn't run "cat" as regular user but I
> could as root how could that form a "multiversing" be -technically-
> happening (other than having forces actively messing with your work)?
>

  This could happen if cat has mode 744 (executable only
  by owner) or some kind of SElinux magic.


> export _GRAALVM_HOME=.../graalvm-ce-java17-22.1.0
> export PATH=${PATH}:${_GRAALVM_HOME}/bin
> which javac
> which java
> $
>
> bash: which: command not found
>

 which has been deprecated. Use command -v. If you need which -a, you
are
  out of luck... Please find an attached which if you are interested.

# apt-get install which
> Reading package lists... Done
> Building dependency tree... Done
> Reading state information... Done
> E: Unable to locate package which
> #
>
>
>
> # cat /etc/apt/sources.list
> # deb cdrom:[Official Debian GNU/Linux Live 11.2.0 lxde
> 2021-12-18T12:41]/ bullseye main
> #deb cdrom:[Official Debian GNU/Linux Live 11.2.0 lxde
> 2021-12-18T12:41]/ bullseye main
>
> deb http://security.debian.org/debian-security bullseye-security main
> deb-src http://security.debian.org/debian-security bullseye-security main
>
> # bullseye-updates, to get updates before a point release is made;
> # see
> https://www.debian.org/doc/manuals/debian-reference/ch02.en.html#_updates_and_backports
> # A network mirror was not selected during install.  The following entries
> # are provided as examples, but you should amend them as appropriate
> # for your mirror of choice.
> #
> deb http://deb.debian.org/debian/ bullseye-updates main
> deb-src http://deb.debian.org/debian/ bullseye-updates main
>
> deb http://deb.debian.org/debian bullseye main contrib non-free
> deb-src http://deb.debian.org/debian bullseye main contrib non-free
>
> deb http://deb.debian.org/debian-security/ bullseye-security main
> contrib non-free
> deb-src http://deb.debian.org/debian-security/ bullseye-security main
> contrib non-free
>
> deb http://deb.debian.org/debian bullseye-updates main contrib non-free
> deb-src http://deb.debian.org/debian bullseye-updates main contrib
> non-free
>
> #This system was installed using small removable media
> # (e.g. netinst, live or single CD). The matching "deb cdrom"
> # entries were disabled at the end of the installation process.
> # For information about how to configure apt package sources,
> # see the sources.list(5) manual.
>
> # which bash
> /usr/bin/bash
> #
>

Some shells have which baked in. For how long?

  Best,

  Loïc


which
Description: Binary data


Re: bash: which: command not found? + (E: Unable to locate package which? ...)

2022-07-08 Thread Thomas Schmitt
Hi,

Albretch Mueller wrote:
> # apt-get install which
> E: Unable to locate package which

Try

  apt-get install debianutils

I got the proposal from
  $ apt-file search which | grep 'which$' | less
which still finds 18 lines which end by "which".
Number two looks like the program you look for:
  debianutils: /usr/bin/which

Indeed my system says:
  $ which which
  /usr/bin/which

You may also use bash builtin command

  $ type -p cat
  /usr/bin/cat


> Actually, I just noticed I couldn't run "cat" as regular user but I
> could as root how could that form a "multiversing" be -technically-
> happening (other than having forces actively messing with your work)?

Maybe some user-defined alias ?
Try

  alias cat

Mine says "bash: alias: cat: not found". But with "cp" instead of "cat"
it says "alias cp='cp -i'".


Have a nice day :)

Thomas



bash: which: command not found? + (E: Unable to locate package which? ...)

2022-07-08 Thread Albretch Mueller
 Actually, I just noticed I couldn't run "cat" as regular user but I
could as root how could that form a "multiversing" be -technically-
happening (other than having forces actively messing with your work)?

export _GRAALVM_HOME=.../graalvm-ce-java17-22.1.0
export PATH=${PATH}:${_GRAALVM_HOME}/bin
which javac
which java
$

bash: which: command not found

# apt-get install which
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package which
#



# cat /etc/apt/sources.list
# deb cdrom:[Official Debian GNU/Linux Live 11.2.0 lxde
2021-12-18T12:41]/ bullseye main
#deb cdrom:[Official Debian GNU/Linux Live 11.2.0 lxde
2021-12-18T12:41]/ bullseye main

deb http://security.debian.org/debian-security bullseye-security main
deb-src http://security.debian.org/debian-security bullseye-security main

# bullseye-updates, to get updates before a point release is made;
# see 
https://www.debian.org/doc/manuals/debian-reference/ch02.en.html#_updates_and_backports
# A network mirror was not selected during install.  The following entries
# are provided as examples, but you should amend them as appropriate
# for your mirror of choice.
#
deb http://deb.debian.org/debian/ bullseye-updates main
deb-src http://deb.debian.org/debian/ bullseye-updates main

deb http://deb.debian.org/debian bullseye main contrib non-free
deb-src http://deb.debian.org/debian bullseye main contrib non-free

deb http://deb.debian.org/debian-security/ bullseye-security main
contrib non-free
deb-src http://deb.debian.org/debian-security/ bullseye-security main
contrib non-free

deb http://deb.debian.org/debian bullseye-updates main contrib non-free
deb-src http://deb.debian.org/debian bullseye-updates main contrib non-free

#This system was installed using small removable media
# (e.g. netinst, live or single CD). The matching "deb cdrom"
# entries were disabled at the end of the installation process.
# For information about how to configure apt package sources,
# see the sources.list(5) manual.

# which bash
/usr/bin/bash
#