bash.exe: warning: could not find /tmp, please create - sublimetext2

why my sublime text giving me warning: bash.exe: warning: could not find /tmp, please create
although it is building and running the code correctly.
Please help me just got irritated by seeing this warning.
I have searched the whole web but i couldn't find any solution

This error message is misleading. At least for me it did not solve the problem after creating /tmp directory. Problem was solved after I killed sh.exe.

To piggyback on Kode Charlie's answer:
Open Start Menu
Type "cmd"
Press Enter
type "bash"
Press Enter
type "mkdir /tmp"
Press Enter
Close the command prompt window
Solved the error for me in Sublime Text 2.

In my case I am using windows. My solution was:
Find "bash.exe" at git folder installation - default is
"C:\Program Files\Git\bin";
Double click bash.exe;
At the command line type: mkdir /tmp
And done.

Try opening a bash-shell, and then:
$ mkdir /tmp
See if that makes the warning go away.

If you're using Git for Windows, just create the directory:
C:\Program Files\Git\tmp

Rebooting Windows fixed it for me.

To add to Necros answer, Not all windows 10 builds even come with bash
https://www.windowscentral.com/how-install-bash-shell-command-line-windows-10

Seems like a harmless error that can be ignored. It also occurs when your /tmp/ is a mount to %TEMP%
C:\Program Files\Git\usr\bin>.\env bash
bash.exe: warning: could not find /tmp, please create!
bash: __git_ps1: command not found
/cygdrive/c/Program Files/Git/usr/bin
So for instance, you may get this error if you have a bash script with a shebang
#!/usr/bin/env bash

Although not SublimeText related, I had this warning when running make.exe from a "Git Bash" environment.
The cause ? Due to search path ordering, a different sh.exe was being executed. (I.e. not in /usr/bin)
$ sh
$ ps -s
4348 pty1 09:48:42 /usr/bin/ps
4836 pty1 09:48:40 /c/Users/Nigel/bin/sh
4400 pty1 09:48:36 /usr/bin/bash
4596 ? 09:48:36 /usr/bin/mintty
4808 ? 09:36:14 /usr/bin/mintty
512 pty0 09:36:14 /usr/bin/bash
After deleting the unwanted left-over C:\Users\Nigel\bin\sh.exe; the warning no longer appears.

Related

How to run html file on port 8080 through vs code

I am trying to run my html file on port 8080 through command 'http-server' but the terminal keeps saying 'command not found'.
I have tried solving this through 'npx http-server' and 'npm install -g http-server' but then I'm told that the 'npx' and 'npm' commands cannot be found as well.
hello friends please make sure you install node js correctly and maybe this article could help
try node -v for check node is install or not
try npm -v for check npm is install or not
NOTE if you are using windows please make sure to add PATH
how to add PATH in windows
search 'Environment Variables' on global search
Choose “Edit system environment variables”.
Click “Environment Variables” in the “Advanced” tab.
In the “System Variables” box, search for Path and edit it to include the path C:\Program Files\nodejs. If you don’t see it there click “New” then add this path. (Note: Depending on your version you may just need to edit and append this path to what’s there by prefixing it with a semicolon. You’ll see the other paths there are also separated by semicolons).
If you are using linux it could be the permission issues
sudo chown -R $(whoami):admin /usr/local/lib/node_modules/
https://linuxhint.com/npm-command-not-found/

Supervisord on Fedora configuration error

I am trying to install supervisor on my Fedora 17, using this link as reference:
https://www.digitalocean.com/community/articles/how-to-install-and-manage-supervisor-on-ubuntu-and-debian-vps
It works fine except one trivial problem (I believe).
A simple configuration for our script, saved at /etc/supervisor/conf.d/long_script.conf, would look like so (...)
My problem is, that I have only files/directories:
/etc/supervisord/
/etc/supervisord.conf
I have tried to create conf.d directory under /etc/supervisord/. I have put my config file into /etc/supervisord/conf.d/ and /etc/supervisord/ and also /etc/sueprvisor/.
Despite my effort when issuing command:
supervisortctl reread
I receive:
No config updates to processes
Anyone has a clue what I might be doing wrong? Thanks in advance.
(I'm on Fedora 20) If you look at /etc/supervisord.conf at the bottom you see
[include]
files = supervisord.d/*.ini
So on Fedora your configuration files should end in .ini instead of .conf. I had this same problem and running supervisorctl reread after this detects stuff
There is no need to create a folder specifically for your configuration file, you can specify its path with the -c /path/to/your/file or --configuration=/path/to/your/file option.
Source: http://supervisord.org/running.html

Unable to run package setup:

Getting this error in sublime text, wondering what to do about it. Is there a way to completely uninstall any related files to ST2? I tried uninstalling it and re-installing it, but this error still persists. I imagine there are some temp files, or cached files that I need to remove, is there a way to clear those out?
Unable to run package setup:
Traceback (most recent call last):
File "/usr/lib/sublime-text-2/PackageSetup.py", line 165, in upgrade
upgradePackage(pkg, pristinedir, datadir, backupdir)
File "/usr/lib/sublime-text-2/PackageSetup.py", line 158, in upgradePackage
os.path.join(backupdir, base), inhibitOverwrite)
File "/usr/lib/sublime-text-2/PackageSetup.py", line 90, in upgradeArchive
writeFile(fname, newar.read(f))
File ".\zipfile.py", line 834, in read
File ".\zipfile.py", line 857, in open
File ".\zipfile.py", line 824, in getinfo
KeyError: "There is no item named u'nathos-sass-textmate-bundle-0e46064/Snippets/expression(\\u2026).tmSnippet' in the archive"
execute
sudo sublime
for the first time
On Ubuntu:
I tried Achu solution but it didn't work. My Sublime Text 2 started working after I changed the files owner to my user. You have to open Terminal (ctrl+alt+t) and type:
sudo chown -R [your user name here] /home/[your user name here]/.config/sublime-text-2/
So, for example, if your user is "john" you have to type:
sudo chown -R john /home/john/.config/sublime-text-2/
Hope this helps.
Similar to Victor's answer, but more specific, I deleted the single file C:\Users\(Username)\AppData\Roaming\Sublime Text 2\ Installed Packages\Sass.sublime-package and then Sublime Text 2 started up fine.
On Ubuntu:-
I found this is a permission issue. Just change the permission to 777
sudo chmod 777 -R /home/user/.config/sublime-text-2/Packages/[package name]
The last line says:
KeyError: "There is no item named u'nathos-sass-textmate-bundle-0e46064/Snippets/expression(\\u2026).tmSnippet' in the archive"
So search for that object recursively in files in the sublime text user data directory:
cd ~/Library/Application\ Support/Sublime\ Text\ 2/
grep -r nathos-sass-textmate-bundle-d6d079e *
#Result# Binary file Installed Packages/Sass.sublime-package matches
Then delete the offending file:
rm -rf Installed\ Packages/Sass.sublime-package
I deleted some erronous packages which solved my problem. Steps to do it here: http://untroubler.com/questions/8-sublime-text-2-and-unable-to-run-package-setup
Update after comment below:
This is due to a corrupt install of a package. On OSX, goto:
/Users/YOU_USER_NAME/Library/Application Support/Sublime Text 2/Installed Packages/.
Remove the package you tried to install and it should work again.
I managed to find all related files to this bundle and deleted them manually. I've noticed that if I miss a package from somewhere ST2 recreates some folders based on packages related to it, so it's not enough to delete some folders, you have to really find all related data and delete it.
sudo sublime-text
This works for me.
Simply reverting Sublime Text to a freshly installed state resolved this issue.
Sublime Text 2 can be reverted to a freshly installed state by removing your data folder. Depending on your operating system, this folder is located:
OS X: ~/Library/Application Support/Sublime Text 2
Windows: %APPDATA%\Sublime Text 2
Linux: ~/.config/sublime-text-2
To revert to a frestly installed state on Ubuntu 13.10, you can:
Exit Sublime Text 2
Delete (or move) the data folder, so running sudo rm -rf
~/.config/sublime-text-2
Start Sublime Text 2
Hope this helps.
There's already an answer related to permissions for Linux, but I found the issue was related to permissions for a Windows install. I placed the install for portable files into "Program Files/SublimeText2" - apparently when I run ST2 it needs additional permissions which it wasn't getting.
So I installed ST2 portable to a folder in a user directory (e.g. A folder my user created and maintains - C:\dev\SublimeText2) and everything works fine now.

Copying a MySQL database to another machine

I'm trying make a copy of a MySQL database on another server. I stop the server, tar up the mysql directory, copy it to the other server and untar it. I set all the permissions to match to the working server, and copied the my.cnf file so everything is the same except for server specific changes.
However, when I try to startup the server, I get the following InnoDB error:
InnoDB: Operating system error number 13 in a file operation.
This error means mysql does not have the access rights to
the directory.
File name /var/lib/mysql/ibdata1
File operation call: 'open'.
The owner/group for all the files is mysql. I even tried changing permissions to a+rw. I can su to the mysql user and access the ibdata1 file using head.
SOLUTION:
The problem was selinux was enabled and preventing the new files from being accessed.
A silly question, but people forget: you said you checked that all files have the same permissions; still, even though it said so in the message, might you possibly have forgotten to check the permissions on the containing directory?
UPDATE: Two more suggestions:
You might try inserting --console and --log-warnings flags, for lots of debugging output, something like this (on my Mac):
/usr/libexec/mysqld --console --log-warnings --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-external-locking --socket=/var/lib/mysql/mysql.sock
If all else fails, you can probably try strace mysqld ... to see what exactly is it failing. The error will be somewhere at the bottom.
UPDATE2: Interesting indeed... I can't see what your OS is. I normally don't use /sbin/service, it's a bit mysterious for me; on a Mac, it's deprecated in favour of launchctl with config file in /System/Library/LaunchDaemons/mysqld.plist, and on most Linux boxes you have /etc/init.d/mysqld. So you could insert strace there.
Or (untested, but manpage suggests it's possible) you could try stracing the service call:
strace -ff -o straces /sbin/service start mysqld
This should produce files straces.pid, one of which should be mysqld's, and hopefully you'll find your error there.
This isn't a direct answer to your question, but I would recommend trying one of these programs for your backup / restore needs.
Percona Xtrabackup: https://launchpad.net/percona-xtrabackup
Mydumper: http://www.mydumper.org/
Both are great tools, are free and open source, and will help you avoid that problem entirely.
Hope that helps.

How to install MySQL on Leopard, Mac OS X 10.5?

I followed this tutorial to the very end, then found out it didn't work right. I think I have everything installed but when I type
mysql -uroot
I only get
-bash: mysql: command not found
Note: I did not skip the "Setting the Path" step. Upon running this command for the first time:
mate ~/.bash_login
This brought up an empty file. So I added this line:
export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH"
I saved the file, closed TextMate, executed the following command:
. ~/.bash_login
...and continued with the tutorial. Based on your suggestions, I thought maybe the file didn't actually get saved. So I ran the following command to bring up the file again:
mate ~/.bash_login
...yet the contents of the file were as they should be.
Any suggestions?
You probably don't have the mysql binaries in your path.
The link you posted has a section on setting the path, titled "Setting the Path Do not skip this step! Most everything else will fail if you do."
EDIT: As debugging steps, try:
First launching a new terminal window. Does it run now?
Typing "echo $PATH" at the prompt. Does the path show up correctly as you've typed it in bash_profile?
Running it the long way: /usr/local/mysql/bin/mysql -u root
Does the application run?
Did you follow the step that says
Setting the Path
Do not skip this step! Most everything
else will fail if you do.
Did you close your terminal window and re-open it afterwards?
Update:
What does "which mysql" say? Does "ls /usr/local/mysql/bin" say?
Two things:
Try editing ~/.profile (rather than ~/.bash_profile or ~/.bash_login).
You may find it easier to use the native Mac style .dmg installer directly from Sun.
One nice thing about the dmg installer is that it automagically sets up symlinks to /usr/local/mysql (which means less - or no - fiddling with your $PATH).
Another option would be to use MAMP.
It has Apache, PHP and MySQL packaged with no further setup necessary.
MySQL is usually put in /usr/local/mysql/bin/
You need to add this to your PATH, you can do this by adding the follwoing lines to your .bash_profile
PATH=$PATH:/usr/local/mysql/bin/
export PATH
The .bash_profile file is located in the root of your username directory.
Make sure you restart your Terminal for the setting to take affect.
And if you're not a command-line person, I highly recommend you also install the MySQL Preference Pane to start/stop the server and install Sequel Pro to create databases and run queries.
ftp://ftp.mysql.com/pub/mysql/download/gui-tools/MySQL.prefPane-leopardfix.zip
http://www.sequelpro.com/