question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unexpected end of file sh: error importing function definition after update to v1.12.1

See original GitHub issue
Error: sh: module: line 1: syntax error: unexpected end of file
sh: error importing function definition for `BASH_FUNC_module'
sh: scl: line 1: syntax error: unexpected end of file
sh: error importing function definition for `BASH_FUNC_scl'
    at parameters.exit (/home/msfernandes/.atom/packages/linter-flake8/node_modules/atom-linter/lib/helpers.js:47:27)
    at triggerExitCallback (/usr/share/atom/resources/app.asar/src/buffered-process.js:213:47)
    at /usr/share/atom/resources/app.asar/src/buffered-process.js:227:18
    at Socket.<anonymous> (/usr/share/atom/resources/app.asar/src/buffered-process.js:98:18)
    at emitOne (events.js:82:20)
    at Socket.emit (events.js:169:7)
    at Pipe._onclose (net.js:469:12)

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:19 (7 by maintainers)

github_iconTop GitHub Comments

16reactions
cnicodemecommented, Dec 6, 2016

Thank you @steelbrain. The issue was not solved via your linked solution, but the link right after (https://github.com/AtomLinter/linter-puppet-lint/issues/68).

I did a search before ending here (my search was the reason I come up here 😉), and I decided to ask because I didn’t find the right solution for me. In retrospect, I may have searched with the wrong keyword 😉

For all others that have the same issue here, and are using Fedora, the solution is simple :

  1. Remove scl-utils : sudo dnf remove scl-utils. Don’t worry, it’s not useful on Fedora (it’s more RHEL related)
  2. Reboot, and you won’t have the problem again. This is important, if you don’t reboot, nothing will change. (Don’t ask me why!)

Thank you for your help @steelbrain 😃

10reactions
steelbraincommented, Mar 2, 2016

This is a user misconfiguration, the user has syntax errors in their rc files

Read more comments on GitHub >

github_iconTop Results From Across the Web

sh: which: line 1: syntax error: unexpected end of file
The error message hints at the Bash feature of exporting and importing shell functions to child shells through the environment.
Read more >
After installing a service pack, shell script issues occurs ... - IBM
This feature is a linux scripting configuration issue. Answer. Unset any following environment variables: "BASH_FUNC_module, BASH_FUNC__ ...
Read more >
Huge lots of errors when importing libraries - Stack Overflow
See Unexpected end of file sh: error importing function definition after update to v1.12.1 #165, getting errors while using terminal #293, ...
Read more >
module: line 1: Syntax Error: Unexpected End Of File' or ...
When attempting to apply a patch using adop or while starting services ... sh: error importing function definition for 'BASH_FUNC_module'.
Read more >
Post installation error for NNMi on RHEL 8.5 - Micro Focus
... 8.5 throws errors 'error importing function definition for `which' ... stderr> sh: which: line 1: syntax error: unexpected end of file ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found