1

I have searched this page for a similar question but found none. I use ubuntu 20.0 on hp workstation. Anytime I use $sudo su and input the root password the system gets stuck. Although when I use $Ctrl+c it gives me the root privilege but also returns an error (see below). I'm guessing this has something to do with the system configuration.

^CTraceback (most recent call last):
  File "/software/anaconda3/bin/conda", line 13, in <module>
    sys.exit(main())
  File "/software/anaconda3/lib/python3.8/site-packages/conda/cli/main.py", line 139, in main
    from ..activate import main as activator_main
  File "/software/anaconda3/lib/python3.8/site-packages/conda/activate.py", line 22, in <module>
    from .base.context import ROOT_ENV_NAME, context, locate_prefix_by_name
  File "/software/anaconda3/lib/python3.8/site-packages/conda/base/context.py", line 29, in <module>
    from ..common.configuration import (Configuration, ConfigurationLoadError, MapParameter,
  File "/software/anaconda3/lib/python3.8/site-packages/conda/common/configuration.py", line 37, in <module>
    from .serialize import yaml_round_trip_load
  File "/software/anaconda3/lib/python3.8/site-packages/conda/common/serialize.py", line 30, in <module>
    yaml = get_yaml()
  File "/software/anaconda3/lib/python3.8/site-packages/conda/_vendor/auxlib/decorators.py", line 59, in _memoized_func
    result = func(*args, **kwargs)
  File "/software/anaconda3/lib/python3.8/site-packages/conda/common/serialize.py", line 19, in get_yaml
    import ruamel_yaml as yaml
  File "/software/anaconda3/lib/python3.8/site-packages/ruamel_yaml/__init__.py", line 13, in <module>
    from .cyaml import *                               # NOQA
  File "/software/anaconda3/lib/python3.8/site-packages/ruamel_yaml/cyaml.py", line 5, in <module>
    from ruamel_yaml.ext._ruamel_yaml import CParser, CEmitter  # type: ignore
  File "ruamel_yaml/ext/_ruamel_yaml.pyx", line 20, in init ruamel_yaml.ext._ruamel_yaml
  File "/software/anaconda3/lib/python3.8/site-packages/ruamel_yaml/parser.py", line 81, in <module>
    from ruamel_yaml.events import *  # NOQA
  File "/software/anaconda3/lib/python3.8/site-packages/ruamel_yaml/events.py", line 118, in <module>
    class AliasEvent(NodeEvent):
KeyboardInterrupt.
1
  • I would ask under what circumstances are you using sudo su and why? I can't think of many situations where it would be prudent to do this and my guess is that you've messed something up in your previous actions when you have used it.
    – Nmath
    Aug 19, 2021 at 20:34

1 Answer 1

1

Anytime I use $sudo su and input the root password

You should be entering your own password there - though that wouldn't cause the problem you describe.

The error message you're getting suggests that the root user has Anaconda installed - which is probably a mistake, and ought to be removed from the root user.

You might try changing to the root user in a different way so that it does not attempt to load /root/.bashrc which I think is the trouble you're having.

Alternatively, you might try to edit /root/.bashrc and comment out the parts which invoke Anaconda.

2
  • 1
    Thank you James.. Your suggestion fixed the error. I comment out the anaconda part in the /root/.bashrc. Cheers
    – Ssap
    Aug 20, 2021 at 15:36
  • Fantastic! glad I could help.
    – James S.
    Aug 20, 2021 at 18:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .