bash_profile | I 'm sharing best practices | Configuration Management library
kandi X-RAY | bash_profile Summary
kandi X-RAY | bash_profile Summary
bash_profile is a configuration file for bash shell. When bash is invoked as an interactive login shell it first reads and executes commands from ~/. bash_profile.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of bash_profile
bash_profile Key Features
bash_profile Examples and Code Snippets
Community Discussions
Trending Discussions on bash_profile
QUESTION
I have this bash function in my .bash_profile:
...ANSWER
Answered 2021-Jun-13 at 16:54As mentioned in the comments of the question, the answer is that I needed to be using a bash session, but was in fact using a zsh session.
Figured this out thanks to @Barmar by running echo $SHELL
As @Shawn mentioned:
== isn't understood by a basic POSIX-only test/[ (Or by zsh's implementation)
Running chsh -s /bin/bash
to change from zsh to bash fixed it, and then I had to reopen the terminal for it to actually take effect (this may not be necessary for everyone, but at least for me using Hyper as my terminal emulator, the change didn't take effect until closing and reopening the app).
QUESTION
I am trying to implement a migration script to export some environment variables in bash.
It is more difficult to be explained that to implement.
Basically, there is a set of environment variables and a set of their default values.
A small fragment of the (gigantic) migration script is reported below:
...ANSWER
Answered 2021-May-09 at 21:03The problem is in the test
QUESTION
I’ve just deployed a VM on microsoft azure, a Centos 7(B1s)
Right now I am trying to install python3 and pip3. I followed this tutorial to install them. Then I checked the packages installed in yum by the following:
sudo yum list installed
as you can see, python3 and pip3 should already be here
...ANSWER
Answered 2021-Jun-10 at 11:02CentOS 7
The 3 year old "tutorial" https://linuxhint.com/install-python-pip-centos7/ is about pip34, python34 .
Today python3 is in the CentOS 7 Base repo http://mirror.centos.org/centos/7.9.2009/os/x86_64/Packages/
→ python3-3.6.8-17.el7
, python3-pip-9.0.3-8.el7
(pip3)
Install python3 :
QUESTION
I'm using CentOS and grails for hosting a web app. I've set the following in /.bash_profile
:
ANSWER
Answered 2021-Jun-01 at 21:46Looks like your JVM is missing some dependencies. I'd uninstall/reinstall that.
Some googling led me to posts here and elsewhere suggesting that the JDK and/or JVM that ships with CentOS specifically excludes certain items due to licensing, and so a reinstall can ensure you have a clean and complete copy.
QUESTION
Stupid question: I'm trying to install libpcap on my macOS (Big Sur) using brew. I've executed "brew install libpcap". Now, I would imagine that I could now run libpcap out of the box, but it tell me that libpcap: command not found
. brew tells me this:
If you need to have libpcap first in your PATH, run: echo 'export PATH="/usr/local/opt/libpcap/bin:$PATH"' >> /Users/michal/.bash_profile
Now I've checkd that it's in the bash_profile, and it doesn't work. So I check the actual package, and in it, there is no binary file. The binary is also not in usr/local/bin
.
brew furthermore tells me that
libpcap is keg-only, which means it was not symlinked into /usr/local because macOS already provides this software and installing another version in parallel can cause all kinds of trouble.
but I don't really know what this means, seeing that I cannot find it anywhere.
What is going on here? Where is it installed, and how do I run that program?
...ANSWER
Answered 2021-May-23 at 09:25From TCPDUMP:
... libpcap, a portable C/C++ library for network traffic capture.
libpcap is a library, not a program.
QUESTION
I'm working on macOS 11.3.1 ARM64 and I'm trying to install with npm the msnodesqlv8
in my node.js project. I've my homebrew installed in /opt/homebrew/bin/brew
, and I've installed with brew the ODBC driver for SQLServer with these commands:
ANSWER
Answered 2021-May-22 at 01:49I solved creating a second environment of brew under /usr/local
using my terminal under Rosetta for x86_64 architecture. I reinstalled the mssql-tools
and msodbcsql17
packages and now reinstalling the msnodesqlv8
module with npm it successfully succeeded.
We'll wait until Microsoft will support ODBC driver for ARM64..
QUESTION
Below is some necessary context for understanding my questions (my shell is /bin/bash
by the way):
ANSWER
Answered 2021-May-19 at 11:38You are using the wrong command:
QUESTION
I have a local dev. environment, where I connect to a SQL DB using SQLAlchemy. I do the following to get secrets from .env
:
ANSWER
Answered 2021-May-18 at 16:29You don't keep them inside the image. Instead, you pass the contents of the envfile in to the docker run
command from the outside.
QUESTION
I use the Simba ODBC driver (2.3.2) to connect Stata to BigQuery from my macOS laptop. I recently upgraded to Big Sur (11.2.1) and lost the ability to do this.
I am using iODBC and I am able to test the DSN successfully. I was also able to get everything to work in macOS 10.15.7 just fine (on a different machine).
The problem appears to be that Stata is not seeing the DYLD_LIBRARY_PATH environment variable that I have defined in my .bash_profile profile according to the driver configuration instructions.
In Stata, I get this error:
...ANSWER
Answered 2021-Apr-26 at 21:50To fix this, you need to disable SIP, which keeps the $DYLD_LIBRARY_PATH
environment variable from being defined without issuing a warning.
To disable SIP:
- Restart your computer in Recovery mode by holding down Command(⌘)-R once it powers off. Press that until you see the Apple icon and a progress bar.
- From the Utilities menu, select Terminal.
- At the prompt, type the following command and then press return:
csrutil disable
- Terminal should display a message that SIP was disabled.
- From the Apple menu, select Restart.
Now you need to define an environment variable that points to the folder with libiodbc.dylib. To figure out where that folder is, type this in Terminal:
find / -name libiodbc.dylib 2>&1 | grep -v "find: "
Using your favorite text editor (like pico, emacs, or vi), you need to edit your .zshenv file. Open this file (or create it if it does not exist) with
pico ~/.zshenv
Using the first folder from above, define an environment variable by typing this in the file:
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:
Save and exit the text editor.
To apply the changes to the current shell, type source .zshenv
.
This should make Stata and BQ play nice again.
zsh is the default shell starting with Catalina, so if you use another shell, you should modify things accordingly. I use bash myself, but I hope my translation for zsh works.
You may need to start Stata from the command line for this to fully work. Here's the output of the command after the fix above:
QUESTION
I installed python3.7 using:
...ANSWER
Answered 2021-May-04 at 12:35There are a few things that you could try:
- Make sure your path is correct and properly connected
- Go to
users>your_user
then click onCmd+shift+.
this way you will be able to access the hidden files, then proceed to open the.bash_profile
and make sure the export path is properly entered/or enter it and save. (remember to refresh the terminal before running the python command) - Try typing just python3 in the terminal, the terminal should automatically recognize which version of python you are working on.
- You could add your export path to
.zshrc
file and shift to the zsh terminal by enteringchsh -s /bin/zsh
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install bash_profile
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page