Error found when loading home user profile

I installed homebrew last night to enable me to install wtfutil terminal on my Ubuntu 20.4. I did successfully and later decided to uninstall it. It seems that it uninstalled alright but left some ...

I installed homebrew last night to enable me to install wtfutil terminal on my Ubuntu 20.4. I did successfully and later decided to uninstall it.

It seems that it uninstalled alright but left some errors that I don’t understand. I’m new to Ubuntu/Linux so this troubles me a lot since I cannot access my desktop after entering my password.

Here is the full error:

Error found when loading /home/[user]/.profile

/home/[user]/.profile: line 28: /home/linuxbrew/.linuxbrew/bin/brew: No such file or directory 

As a result the session will not be configured correctly.
You should fix the problem as soon as feasible.

pomsky's user avatar

pomsky

65.7k20 gold badges228 silver badges241 bronze badges

asked Jun 19, 2020 at 14:47

syntacticgeorge's user avatar

13

I had the exact same issue and this is really useful, and the comments from synacticgeorge up are the fix.

  • Reboot
  • On login screen, CTRL+ALT+F3 and login in TTY
  • nano .profile (or vi, gedit, whatever)
  • Remove the offending brew line.
  • Profit

answered Feb 11, 2021 at 15:52

pcambra's user avatar

do:
$ nano ~/.profile

go to end of the file, and comment out the following:

#if [ -d "$HOME/.local/bin" ] ; then
#    PATH="$HOME/.local/bin:$PATH"
#fi
#eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)

Finally save it:

Ctrl + X 
Y
Enter
sudo reboot now

you are good to go)

answered Jun 13, 2022 at 13:29

yogender's user avatar

You probably copied the install instructions and added homebrew to your path. If you remove the reference to homebrew from /home/user/.profile it should work again

type in terminal
rm -rf /home/[user]/.profile

answered Jan 5, 2021 at 13:27

rekto-san Tutor's user avatar

1

My laptop used to have Ubuntu 16.04 LTS. I upgraded it to Ubuntu 18.04 LTS. After upgrading, every time I boot it, it shows this error message:

Error found when loading /home/[user]/.profile:

home/[user]/.bash_it/lib/helpers.bash: line 6: continue: only meaningful in ‘for’, ‘while’, or ‘until’ loop

home/[user]/.bash_it/lib/helpers.bash: line 6: continue: only meaningful in ‘for’, ‘while’, or ‘until’ loop

home/[user]/.bash_it/lib/helpers.bash: line 6: continue: only meaningful in ‘for’, ‘while’, or ‘until’ loop

As a result the session will not be configured correctly.

When I click OK, the message disappears. When I open the terminal, this appears:

continue: only meaningful in ‘for’, ‘while’, or ‘until’ loop

continue: only meaningful in ‘for’, ‘while’, or ‘until’ loop

continue: only meaningful in ‘for’, ‘while’, or ‘until’ loop

I tried editing line 6 of helpers.bash and changed continue to return but the problem still persists. This is the code for helpers.bash:

# Helper function loading various enable-able files
function _load_bash_it_files() {
  subdirectory="$1"
  if [ ! -d "${BASH_IT}/${subdirectory}/enabled" ]
  then
    continue
  fi
  FILES="${BASH_IT}/${subdirectory}/enabled/*.bash"
  for config_file in $FILES
  do
    if [ -e "${config_file}" ]; then
      source $config_file
    fi
  done
}

# Function for reloading aliases
function reload_aliases() {
  _load_bash_it_files "aliases"
}

# Function for reloading auto-completion
function reload_completion() {
  _load_bash_it_files "completion"
}

# Function for reloading plugins

function reload_plugins() {
  _load_bash_it_files "plugins"
}

bash-it ()
{
    about 'bash-it help and maintenance'
    param '1: verb [one of: help | show | enable | disable ]'
    param '2: component type [one of: alias(es) | completion(s) | plugin(s) ]'
    param '3: specific component [optional]'
    example '$ bash-it show plugins'
    example '$ bash-it help aliases'
    example '$ bash-it enable plugin git'
    example '$ bash-it disable alias hg'
    typeset verb=${1:-}
    shift
    typeset component=${1:-}
    shift
    typeset func
    case $verb in
         show)
             func=_bash-it-$component;;
         enable)
             func=_enable-$component;;
         disable)
     

    func=_disable-$component;;
         help)
             func=_help-$component;;
         *)
             reference bash-it
             return;;
    esac

    # pluralize component if necessary
    if ! _is_function $func; then
        if _is_function ${func}s; then
            func=${func}s
        else
            if _is_function ${func}es; then
                func=${func}es
            else
                echo "oops! $component is not a valid option!"
                reference bash-it
                return
            fi
        fi
    fi
    $func $*
}

_is_function ()
{
    _about 'sets $? to true if parameter is the name of a function'
    _param '1: name of alleged function'
    _group 'lib'
    [ -n "$(LANG=C type -t $1 2>/dev/null | grep 'function')" ]
}

_bash-it-aliases ()
{
    _about 'summarizes available bash_it aliases'
    _group 'lib'

    _bash-it-describe "aliases" "an" "alias" "Alias"
}

_bash-it-completions ()
{
    _about 'summarizes available bash_it completions'
    _group 'lib'

    _bash-it-describe "completion" "a" "completion" "Completion"
}

_bash-it-plugins ()
{
    _about 'summarizes available bash_it plugins'
    _group 'lib'

    _bash-it-describe "plugins" "a" "plugin" "Plugin"
}

_bash-it-describe ()
{
    _about 'summarizes available bash_it components'
    _param '1: subdirectory'
    _param '2: preposition'
    _param '3: file_type'
    _param '4: column_header'
    _example '$ _bash-it-describe "plugins" "a" "plugin" "Plugin"'

    subdirectory="$1"
    preposition="$2"
    file_type="$3"
    column_header="$4"

    typeset f
    typeset enabled
    printf "%-20s%-10s%sn" "$column_header" 'Enabled?' 'Description'
    for f in $BASH_IT/$subdirectory/available/*.bash
    do
        if [ -e $BASH_IT/$subdirectory/enabled/$(basename $f) ]; then
            enabled='x'
        else
            enabled=' '
        fi
        printf "%-20s%-10s%sn" "$(basename $f | cut -d'.' -f1)" "  [$enabled]" "$(cat $f | metafor about-$file_type)"
    done
    printf 'n%sn' "to enable $preposition $file_type, do:"
    printf '%sn' "$ bash-it enable $file_type  <$file_type name> -or- $ bash-it enable $file_type all"
    printf 'n%sn' "to disable $preposition $file_type, do:"
    printf '%sn' "$ bash-it disable $file_type <$file_type name> -or- $ bash-it disable $file_type all"
}

_disable-plugin ()
{
    _about 'disables bash_it plugin'
    _param '1: plugin name'
    _example '$ disable-plugin rvm'
    _group 'lib'

    _disable-thing "plugins" "plugin" $1
}

_disable-alias ()
{
    _about 'disables bash_it alias'
    _param '1: alias name'
    _example '$ disable-alias git'
    _group 'lib'

    _disable-thing "aliases" "alias" $1
}

_disable-completion ()
{
    _about 'disables bash_it completion'
    _param '1: completion name'
    _example '$ disable-completion git'
    _group 'lib'

    _disable-thing "completion" "completion" $1
}

_disable-thing ()
{
    _about 'disables a bash_it component'
    _param '1: subdirectory'
    _param '2: file_type'
    _param '3: file_entity'
    _example '$ _disable-thing "plugins" "plugin" "ssh"'

    subdirectory="$1"
    file_type="$2"
    file_entity="$3"

    if [ -z "$file_entity" ]; then
        reference "disable-$file_type"
        return
    fi

    if [ "$file_entity" = "all" ]; then
        typeset f $file_type
        for f in $BASH_IT/$subdirectory/available/*.bash
        do
            plugin=$(basename $f)
            if [ -e $BASH_IT/$subdirectory/enabled/$plugin ]; then
                rm $BASH_IT/$subdirectory/enabled/$(basename $plugin)
            fi
        done
    else
        typeset plugin=$(command ls $BASH_IT/$subdirectory/enabled/$file_entity.*bash 2>/dev/null | head -1)
        if [ -z "$plugin" ]; then
            printf '%sn' "sorry, that does not appear to be an enabled $file_type."
            return
        fi
        rm $BASH_IT/$subdirectory/enabled/$(basename $plugin)
    fi

    printf '%sn' "$file_entity disabled."
}

_enable-plugin ()
{
    _about 'enables bash_it plugin'
    _param '1: plugin name'
    _example '$ enable-plugin rvm'
    _group 'lib'

    _enable-thing "plugins" "plugin" $1
}

_enable-alias ()
{
    _about 'enables bash_it alias'
    _param '1: alias name'
    _example '$ enable-alias git'
    _group 'lib'

    _enable-thing "aliases" "alias" $1
}

_enable-completion ()
{
    _about 'enables bash_it completion'
    _param '1: completion name'
    _example '$ enable-completion git'
    _group 'lib'

    _enable-thing "completion" "completion" $1
}

_enable-thing ()
{
    cite _about _param _example
    _about 'enables a bash_it component'
    _param '1: subdirectory'
    _param '2: file_type'
    _param '3: file_entity'
    _example '$ _enable-thing "plugins" "plugin" "ssh"'

    subdirectory="$1"
    file_type="$2"
    file_entity="$3"

    if [ -z "$file_entity" ]; then
        reference "enable-$file_type"
        return
    fi

    if [ "$file_entity" = "all" ]; then
        typeset f $file_type
        for f in $BASH_IT/$subdirectory/available/*.bash
        do
            plugin=$(basename $f)
            if [ ! -h $BASH_IT/$subdirectory/enabled/$plugin ]; then
                ln -s ../available/$plugin $BASH_IT/$subdirectory/enabled/$plugin
            fi
        done
    else
        typeset plugin=$(command ls $BASH_IT/$subdirectory/available/$file_entity.*bash 2>/dev/null | head -1)
        if [ -z "$plugin" ]; then
            printf '%sn' "sorry, that does not appear to be an available $file_type."
            return
        fi

        plugin=$(basename $plugin)
        if [ -e $BASH_IT/$subdirectory/enabled/$plugin ]; then
            printf '%sn' "$file_entity is already enabled."
            return
        fi

        mkdir -p $BASH_IT/$subdirectory/enabled

        ln -s ../available/$plugin $BASH_IT/$subdirectory/enabled/$plugin
    fi

    printf '%sn' "$file_entity enabled."
}

_help-completions()
{
  _about 'summarize all completions available in bash-it'
  _group 'lib'

  _bash-it-completions
}

_help-aliases()
{
    _about 'shows help for all aliases, or a specific alias group'
    _param '1: optional alias group'
    _example '$ alias-help'
    _example '$ alias-help git'

    if [ -n "$1" ]; then
        cat $BASH_IT/aliases/available/$1.aliases.bash | metafor alias | sed "s/$/'/"
    else
        typeset f
        for f in $BASH_IT/aliases/enabled/*
        do
            typeset file=$(basename $f)
            printf 'nn%s:n' "${file%%.*}"
            # metafor() strips trailing quotes, restore them with sed..
            cat $f | metafor alias | sed "s/$/'/"
        done
    fi
}

_help-plugins()
{
    _about 'summarize all functions defined by enabled bash-it plugins'
    _group 'lib'

    # display a brief progress message...
    printf '%s' 'please wait, building help...'
    typeset grouplist=$(mktemp /tmp/grouplist.XXXX)
    typeset func
    for func in $(typeset_functions)
    do
        typeset group="$(typeset -f $func | metafor group)"
        if [ -z "$group" ]; then
            group='misc'
        fi
        typeset about="$(typeset -f $func | metafor about)"
        letterpress "$about" $func >> $grouplist.$group
        echo $grouplist.$group >> $grouplist
    done
    # clear progress message
    printf 'r%sn' '                              '
    typeset group
    typeset gfile
    for gfile in $(cat $grouplist | sort | uniq)
    do
        printf '%sn' "${gfile##*.}:"
        cat $gfile
        printf 'n'
        rm $gfile 2> /dev/null
    done | less
    rm $grouplist 2> /dev/null
}

all_groups ()
{
    about 'displays all unique metadata groups'
    group 'lib'

    typeset func
    typeset file=$(mktemp /tmp/composure.XXXX)
    for func in $(typeset_functions)
    do
        typeset -f $func | metafor group >> $file
    done
    cat $file | sort | uniq
    rm $file
}

Do you have any ideas how to fix this? Please help, I’m literally an ubuntu noob. Thanks!

I’m using ubuntu 22.04 LTS.

The error occurs after entering my user.

This is the description of the error:

error found when loading /home/user/.profile

tput: no value for $TERM and no -T specified 
tput: no value for $TERM and no -T specified 
tput: no value for $TERM and no -T specified 
tput: no value for $TERM and no -T specified

enter image description here

Romeo Ninov's user avatar

Romeo Ninov

15.4k5 gold badges31 silver badges41 bronze badges

asked Aug 10, 2022 at 18:17

Davi Freitas's user avatar

6

As is common with unix programs, they output their name as part of the error message. So in this case the error is coming from the tput command.

tput is used to set up terminals, for example if your terminal has programmable tab settings it can set them up. These days most people no longer need it.

In order to set up your terminal it needs to know what kind of terminal you have. You can tell it either by passing the -T argument with a value or by setting the TERM environment variable. However you appear to have done neither, so you are getting the error message.

The simplest thing to do is add a line

export TERM; TERM=vt100

as the first line of /home/davi/.profile. it will hard code a terminal type which is almost certain to work for you.

answered Aug 10, 2022 at 18:42

icarus's user avatar

icarusicarus

16.8k1 gold badge37 silver badges54 bronze badges

1

I found the reason behind the error: my ´.bashrc´ was empty, so I just had to «make» a new one.

answered Aug 19, 2022 at 16:42

Davi Freitas's user avatar

  • Home
  • Forum
  • The Ubuntu Forum Community
  • Other Discussion and Support
  • Other OS Support and Projects
  • Other Operating Systems
  • Ubuntu/Debian BASED
  • [SOLVED] «Error found when loading /home/user/.profile» upon login

  1. «Error found when loading /home/user/.profile» upon login

    Hello, I had a really quick question. Right after I log in, there is a prompt with a red «X» that says the following:

    Code:

    Error found when loading /home/user/.profile
    
    awk: read error (is a directory)
    
    As a result the session will not be configured correctly. 
    You should fix the problem as soon as feasable.

    I tried using chmod to give +rwx permissions to .profile as I thought that would give permissions to read and write; however, this has not seemed to work. Everything else works fine after I log in, but I didn’t know what the severity of this error message was. Would anyone be able to offer some insight on this problem? Thank you all so much!

    Last edited by DuckHook; November 26th, 2020 at 03:04 AM.

    Reason: Added [CODE] tags, removed interfering formatting.


  2. Re: «Error found when loading /home/user/.profile» upon login

    Welcome to the forums, jkjk24601.

    Please post your output between [CODE] and [/CODE] tags for clarity. Or highlight the output and use the button in the *Adv Reply* toolbar.

    The error message is saying that the system cannot read .profile because it is a directory and not a file (as would be expected). Did you tinker with your /home/user directory and change things?


  3. Re: «Error found when loading /home/user/.profile» upon login

    Yes, sorry for the late reply! After a long overdue hardware upgrade, the error message told me it was missing a file called /etc/llver. I just added a blank file and the system booted up fine.


  4. Re: «Error found when loading /home/user/.profile» upon login

    Good to hear that you solved it. However, please note the following:

    1. There’s no point in asking for help on an Ubuntu forum when you don’t use Ubuntu. Your failure to tell us from the start that you are using Linux Lite OS just wastes helpers time by sending us off on wild goose chases.
    2. Ubuntu does not use the file that you refer to. Different distros are set up with different defaults and config files. Therefore, what is needed in another distro such as yours doesn’t exist in Ubuntu. In other words, without full disclosure from the outset, it is impossible for anyone to help even if they have the requisite knowledge.
    3. I have moved this thread to its appropriate subforum where it will not confuse Ubuntu users. I have also marked it «solved» for posterity. As a side note, you will likely find the sort of help you need on the Linux Lite forums rather than here. I suspect that very few Ubuntu users are familiar with Linux Lite OS.
    4. Last but not least, if you do not intend on replying for a prolonged period, please alert potential helpers ahead of time so that we won’t unsubscribe the thread. As part of my housekeeping habits, I unsubscribe a thread after 4 days of inactivity. I only came across this thread again serendipitously.

    Last edited by DuckHook; December 13th, 2020 at 10:45 PM.

    Reason: Added link.


Bookmarks

Bookmarks


Posting Permissions

Forum rules
There are no such things as «stupid» questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help. Topics in this forum are automatically closed 6 months after creation.

digipunk

Error found when loading /home/user/.profile

I’ve installed a piece of software onto a USB drive. The software requireds setting the right environment variables in the .profile file. However, when logging in, an error message pops up reading ‘Error found when loading /home/user/.profile’. The variables also won’t set without logging out and back in again. I suspect the USB drive only mounts when it’s too late already. Is there solution for this short of installing the program onto the internal drive?

Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.

Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.

User avatar

AndyMH

Level 20
Level 20
Posts: 11071
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Error found when loading /home/user/.profile

Post

by AndyMH » Mon Oct 11, 2021 6:49 am

What software were you trying to install?
How did you try to install it?
What changes did you make to .profile — post the changes?

Homebrew i5-8400+GTX1080 Cinnamon 19.0, 4 x Thinkpad T430 Cinnamon 20.1, 2 x i7-3632 , i5-3320, i5-3210, Thinkpad T60 19.0 Mate

Понравилась статья? Поделить с друзьями:

Читайте также:

  • Error found option without preceding group in config file mysql
  • Error forwarding the new session empty pool of vm for setup capabilities
  • Error forward declaration of class
  • Error forward declaration not solved
  • Error nfsend connect error no such file or directory

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии