LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 09-15-2018, 10:46 AM   #1
niiiro
Member
 
Registered: Feb 2010
Posts: 75

Rep: Reputation: 1
How to get rid of that annoying messages?


Hey guys,

Ubuntu 16.04 LTS, Linux ams-VPS2 4.4.38-std-1 #1 SMP Mon Dec 12 10:45:29 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

I keep getting these annoying message on the CLI, for every input, I get to see it:

[ERROR] The current switch (4.06.1) is an unknown compiler switch.

How can I get rid of it?


Thanks!
 
Old 09-15-2018, 11:06 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,954

Rep: Reputation: 7329Reputation: 7329Reputation: 7329Reputation: 7329Reputation: 7329Reputation: 7329Reputation: 7329Reputation: 7329Reputation: 7329Reputation: 7329Reputation: 7329
what kind of hardware is it? what do you mean by "for every input" exactly?
probably it is coming from ~/.bashrc, but without knowing more hard to say...
 
Old 09-15-2018, 02:47 PM   #3
niiiro
Member
 
Registered: Feb 2010
Posts: 75

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by pan64 View Post
what kind of hardware is it? what do you mean by "for every input" exactly?
probably it is coming from ~/.bashrc, but without knowing more hard to say...
Thanks for your reply!
Been searching in .bashrc for any suspicious lines - nada.
For every line I input in CLI, I get that message.
 
Old 09-15-2018, 08:11 PM   #4
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,351
Blog Entries: 28

Rep: Reputation: 6147Reputation: 6147Reputation: 6147Reputation: 6147Reputation: 6147Reputation: 6147Reputation: 6147Reputation: 6147Reputation: 6147Reputation: 6147Reputation: 6147
This is truly odd. No answers, but a few questions:

Do you have anything of that nature installed?

Which terminal emulator are you using?

Have you tried a different one?

Just to clarify, this error occurs when you enter the simplest command, such as ls or pwd?

A web search for the error message indicates that it is likely to a third party package manager: https://opam.ocaml.org/ Is it installed to your system?
 
Old 09-16-2018, 01:11 AM   #5
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by niiiro View Post
Thanks for your reply!
Been searching in .bashrc for any suspicious lines - nada.
For every line I input in CLI, I get that message.
please show us all of that file.

the only relevant search result seems to point to a command "opam".
 
Old 09-16-2018, 03:11 AM   #6
niiiro
Member
 
Registered: Feb 2010
Posts: 75

Original Poster
Rep: Reputation: 1
This is how it looks like:

https://preview.ibb.co/ke0aSK/Screen...1_10_43_AM.png
 
Old 09-16-2018, 03:21 AM   #7
niiiro
Member
 
Registered: Feb 2010
Posts: 75

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by frankbell View Post
This is truly odd. No answers, but a few questions:

Do you have anything of that nature installed?

Which terminal emulator are you using?

Have you tried a different one?

Just to clarify, this error occurs when you enter the simplest command, such as ls or pwd?

A web search for the error message indicates that it is likely to a third party package manager: https://opam.ocaml.org/ Is it installed to your system?
Well, It must be related to the package 'Opam' although I didn't even have that installed. So I tried installing it, hopefully, it'd help to solve the issue - but it didn't.

The error occurs on every command, even just hitting enter for a blank line brings it up.
 
Old 09-16-2018, 03:22 AM   #8
niiiro
Member
 
Registered: Feb 2010
Posts: 75

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by ondoho View Post
please show us all of that file.

the only relevant search result seems to point to a command "opam".
Code:
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples

# If not running interactively, don't do anything
[ -z "$PS1" ] && return

# don't put duplicate lines in the history. See bash(1) for more options
# ... or force ignoredups and ignorespace
HISTCONTROL=ignoredups:ignorespace

# append to the history file, don't overwrite it
shopt -s histappend

# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=1000
HISTFILESIZE=2000

# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize

# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"

# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
    debian_chroot=$(cat /etc/debian_chroot)
fi

# set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in
    xterm-color) color_prompt=yes;;
esac

# uncomment for a colored prompt, if the terminal has the capability; turned
# off by default to not distract the user: the focus in a terminal window
# should be on the output of commands, not on the prompt
#force_color_prompt=yes

if [ -n "$force_color_prompt" ]; then
    if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
        # We have color support; assume it's compliant with Ecma-48
        # (ISO/IEC-6429). (Lack of such support is extremely rare, and such
        # a case would tend to support setf rather than setaf.)
        color_prompt=yes
    else
        color_prompt=
    fi
fi

if [ "$color_prompt" = yes ]; then
    PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
else
    PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi
unset color_prompt force_color_prompt

# If this is an xterm set the title to user@host:dir

case "$TERM" in
xterm*|rxvt*)
    PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
    ;;
*)
    ;;
esac

# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
    test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
    alias ls='ls --color=auto'
    #alias dir='dir --color=auto'
    #alias vdir='vdir --color=auto'

    alias grep='grep --color=auto'
    alias fgrep='fgrep --color=auto'
    alias egrep='egrep --color=auto'
fi

# some more ls aliases
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'

# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.

if [ -f ~/.bash_aliases ]; then
    . ~/.bash_aliases
fi

# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
#if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
#    . /etc/bash_completion
#fi
 
Old 09-16-2018, 03:51 AM   #9
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,954

Rep: Reputation: 7329Reputation: 7329Reputation: 7329Reputation: 7329Reputation: 7329Reputation: 7329Reputation: 7329Reputation: 7329Reputation: 7329Reputation: 7329Reputation: 7329
probably execute: set -xv and see what's happening. When you press enter next time it should print some additional info.

How PS1 is actuall set?
 
Old 09-16-2018, 05:58 AM   #10
niiiro
Member
 
Registered: Feb 2010
Posts: 75

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by pan64 View Post
probably execute: set -xv and see what's happening. When you press enter next time it should print some additional info.

How PS1 is actuall set?
set -xv
_opam_env_hook;
++ _opam_env_hook
++ local previous_exit_status=0
opam env --shell=bash --readonly
+++ opam env --shell=bash --readonly
[ERROR] The current switch (4.06.1) is an unknown compiler switch.
++ eval
++ return 0

I guess that it is.. How do I get rid of that?
 
Old 09-16-2018, 09:10 AM   #11
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,954

Rep: Reputation: 7329Reputation: 7329Reputation: 7329Reputation: 7329Reputation: 7329Reputation: 7329Reputation: 7329Reputation: 7329Reputation: 7329Reputation: 7329Reputation: 7329
so you need to find where that opam_env_hook defined/called. It is not that .bashrc as we can see.
see man bash and look for invocation. There you can see the list of the files [probably] involved.
 
Old 09-17-2018, 12:27 AM   #12
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
typical places to search would be ~/.bash_aliases, /etc/bash.bashrc, ~/.profile or ~/.bash_profile and /etc/profile.
if all else fails, try this:
Code:
find / -iname '*opam*' 2>/dev/null
this will take a looooong time.
if that doesn't help either, try
Code:
grep -riIm1 opam / 2>/dev/null
that will take even longer.
 
Old 09-21-2018, 03:46 AM   #13
niiiro
Member
 
Registered: Feb 2010
Posts: 75

Original Poster
Rep: Reputation: 1
guys, now for every line I get to see that:

root@ams-VPS2:~/.opam#
[ERROR] In /root/.opam/config:
Field "opam-version" is missing
Fatal error:
OpamFormat.Bad_format(0, 0, "Field "opam-version" is missing")


How do I get rid of it?? this is getting so annoying :-(
 
Old 09-21-2018, 03:48 AM   #14
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,954

Rep: Reputation: 7329Reputation: 7329Reputation: 7329Reputation: 7329Reputation: 7329Reputation: 7329Reputation: 7329Reputation: 7329Reputation: 7329Reputation: 7329Reputation: 7329
you need to check /etc/profile and probably some other files if they use /root/.opam/config (or something related).
It looks like it is corrupted.
 
Old 09-22-2018, 12:40 AM   #15
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by niiiro View Post
guys, now for every line I get to see that:

root@ams-VPS2:~/.opam#
[ERROR] In /root/.opam/config:
Field "opam-version" is missing
Fatal error:
OpamFormat.Bad_format(0, 0, "Field "opam-version" is missing")


How do I get rid of it?? this is getting so annoying :-(
since you did not reply to my request, i will not reply to yours either.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Would like to get rid of annoying feature in gnome kaelthas Linux - Software 3 06-09-2007 10:31 PM
Get rid off an annoying kernel message kloss Linux - General 16 05-09-2006 10:50 AM
How do I get rid of that annoying disco music? purelithium Mandriva 4 11-09-2005 06:55 PM
Getting rid of annoying beeps in console? sharpie Slackware 8 03-11-2004 12:48 AM
How do I get rid of that annoying ping in Gnome 1.2? CragStar Linux - General 2 12-22-2000 09:18 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration