[SOLVED] Cannot install anything through console

New to Debian (Or Linux in general)? Ask your questions here!

[SOLVED] Cannot install anything through console

Postby debiannoobie » 2018-11-08 14:10

Hello,
I tried to install OpenJDK (and few other softwares) but all of them fail. Console gives me this:

root@debian:/home/user# apt-get install openjdk-8-jdk
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libice-dev libpthread-stubs0-dev libsm-dev libx11-dev libxau-dev libxcb1-dev libxdmcp-dev libxt-dev openjdk-8-jdk-headless
openjdk-8-jre openjdk-8-jre-headless x11proto-core-dev x11proto-dev xorg-sgml-doctools xtrans-dev
Suggested packages:
libice-doc libsm-doc libx11-doc libxcb-doc libxt-doc openjdk-8-demo openjdk-8-source visualvm icedtea-8-plugin
fonts-ipafont-gothic fonts-ipafont-mincho fonts-wqy-microhei fonts-wqy-zenhei fonts-indic
The following NEW packages will be installed:
libice-dev libpthread-stubs0-dev libsm-dev libx11-dev libxau-dev libxcb1-dev libxdmcp-dev libxt-dev openjdk-8-jdk
openjdk-8-jdk-headless openjdk-8-jre openjdk-8-jre-headless x11proto-core-dev x11proto-dev xorg-sgml-doctools xtrans-dev
0 upgraded, 16 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/37.9 MB of archives.
After this operation, 147 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
dpkg: warning: 'ldconfig' not found in PATH or not executable
dpkg: warning: 'start-stop-daemon' not found in PATH or not executable
dpkg: error: 2 expected programs not found in PATH or not executable
Note: root's PATH should usually contain /usr/local/sbin, /usr/sbin and /sbin
E: Sub-process /usr/bin/dpkg returned an error code (2)


I tried everything I could think of but I cannot get it working.
I really would appreciate if someone tells me what to do.
Thanks
Last edited by debiannoobie on 2018-11-10 14:52, edited 1 time in total.
debiannoobie
 
Posts: 3
Joined: 2018-11-08 14:04

Re: Cannot install anything through console

Postby bw123 » 2018-11-08 14:35

It's okay, you have probably installed testing by mistake. You can either use stable instead, or learn the new way of using 'su -' with a dash, or maybe 'su --login root' instead of just su.

Search the forum if you want some details, it's been covered pretty well in several threads. The man page for su also has a good explanation.

Have fun!
User avatar
bw123
 
Posts: 3528
Joined: 2011-05-09 06:02
Location: TN_USA

Re: Cannot install anything through console

Postby debiannoobie » 2018-11-08 14:45

bw123 wrote:It's okay, you have probably installed testing by mistake. You can either use stable instead, or learn the new way of using 'su -' with a dash, or maybe 'su --login root' instead of just su.

Search the forum if you want some details, it's been covered pretty well in several threads. The man page for su also has a good explanation.

Have fun!


Thank you, thank you, thank you!
Yeah, I forgot to tell that I was on testing.
'su -' worked perfectly. Now I'll look into what is the difference between 'su' and 'su -'.
debiannoobie
 
Posts: 3
Joined: 2018-11-08 14:04

Re: Cannot install anything through console

Postby bw123 » 2018-11-08 14:53

There might be 'release notes' for buster already, but I haven't checked. Stuff like this will probably be mentioned. I'd definitely read up for clues about any other changes in it.
User avatar
bw123
 
Posts: 3528
Joined: 2011-05-09 06:02
Location: TN_USA

Re: Cannot install anything through console

Postby stevepusser » 2018-11-08 20:13

Excuse me, but I don't understand. Since the OP issued the apt command from a root terminal, wasn't switching to root successful in the first place? Or does just "su" in Buster fool you into thinking you're now root when you're really not?
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: Quod Libet 4.2.0, Pale Moon 28.2.0, wine-staging 3.20, GIMP 2.10.8, Liquorix kernel 4.18-22, Midori 6.0
User avatar
stevepusser
 
Posts: 10130
Joined: 2009-10-06 05:53

Re: Cannot install anything through console

Postby Head_on_a_Stick » 2018-11-08 20:24

stevepusser wrote:does just "su" in Buster fool you into thinking you're now root when you're really not?

No, plain `su` still gives a root shell but $PATH is set incorrectly unless `su -` is passed.
I suffer from depression and may lash out occasionally, try not to take it personally.
User avatar
Head_on_a_Stick
 
Posts: 8172
Joined: 2014-06-01 17:46
Location: /dev/chair


Return to Beginners Questions

Who is online

Users browsing this forum: No registered users and 6 guests

fashionable