Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[SOLVED] Cannot install anything through console

New to Debian (Or Linux in general)? Ask your questions here!
Post Reply
Message
Author
debiannoobie
Posts: 3
Joined: 2018-11-08 14:04

[SOLVED] Cannot install anything through console

#1 Post by debiannoobie »

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.

User avatar
bw123
Posts: 4015
Joined: 2011-05-09 06:02
Has thanked: 1 time
Been thanked: 28 times

Re: Cannot install anything through console

#2 Post by bw123 »

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!
resigned by AI ChatGPT

debiannoobie
Posts: 3
Joined: 2018-11-08 14:04

Re: Cannot install anything through console

#3 Post by debiannoobie »

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

User avatar
bw123
Posts: 4015
Joined: 2011-05-09 06:02
Has thanked: 1 time
Been thanked: 28 times

Re: Cannot install anything through console

#4 Post by bw123 »

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.
resigned by AI ChatGPT

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 72 times

Re: Cannot install anything through console

#5 Post by stevepusser »

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?
MX Linux packager and developer

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: Cannot install anything through console

#6 Post by Head_on_a_Stick »

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

Post Reply