I am using this guideline to install solartherm: https://github.com/SolarTherm/SolarTherm/wiki/Running-SolarTherm-on-Windows-%28MSYS2%29
I reach the point where I need to install Dakota and I get this error:
-bash: unzip: command not found
cp: cannot stat 'dakota-6.14.0.Windows.x64/*': No such file or director
The first error message there is telling you that unzip does not exist. That command comes from a file (/usr/bin/unzip.exe) that is provided by an MSYS2 package named unzip. So you need to install that package by running pacman -S unzip and then try again.
Note that the wiki page you linked to already told you to install the unzip package so I recommend that you go back to the beginning of the instructions and double check all of them to make sure you are on the right track. Pay attention to any error messages you receive along the way.
Related
Background:
Dear Stackoverflow community. I recently switched from Windows to MacOS and am at a loss how to configure environment variables. Many of the previous questions asked here are about bash instead of zsh.
Goal:
I am trying to install an npm package globally. For instance:
npm install -g vercel
or any other package, and use it in my Visual Studio Code terminal (also zsh). If I want to deploy code I have to use 'npx vercel deploy' every time. I want to be able to use "vercel deploy" but instead I get:
zsh: command not found: vercel
What I tried so far:
Installing the package in zsh and visual studio code terminals (didn't work)
Setting the path equal on both VS and terminal: export PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
I learned that you need to add environment variabels to a .zshrc file. I don't seem to have a zshrc file. When I do:
sudo ~/.zshrc
Password: XXXXXX
sudo: /Users/vincent/.zshrc: command not found
I am getting another error.
I read in the zsh man file that you should use $HOME/.zshrc instead. Again I am getting the same errors:
vincent#Vincents-MacBook-Air-2 ~ % $HOME/.zshrc
zsh: permission denied: /Users/vincent/.zshrc
vincent#Vincents-MacBook-Air-2 ~ % sudo $HOME/.zshrc
sudo: /Users/vincent/.zshrc: command not found
Update 1:
#slebetman Thank you for your explanation. When I open the terminal I go to home via "cd $HOME" which puts me in in the home directory. However there is no way for me to create a .zshrc file in that directory. Neither via touch or vs code. I am getting the following error: "Unable to write file '/home/.zshrc' (Unknown (FileSystemError): Error: ENOTSUP: operation not supported on socket, open '/home/.zshrc')"
Update 2:
I did manage to find the .zshrc file in visual studio code under /etc. I hope this will work. I was able to overwrite the file with Sudo and add environment variables to it.
Add this to the file .zshrc file under /etc and force overwrite it:
export vercel=/Users/vincent/.npm-global/bin/vercel
Screenshots below for those who will try in the future:
Image with .zshrc file layout
Final remarks:
I don't understand how it is so difficult to add environment variables on Mac while everything else is so easy.
I have read many different questions on stackoverflow, and I can't seem to solve it. Also since I am a newbie I am not allowed to comment on there so I post here in the hope that anyone can help me :)
Best,
Vincent
Note that when you do:
npx vercel deploy
Npm will execute vercel for you without installing it. It does that by temporarily downloading vercel. If you want to run vercel directly without using npx then simply don't use npx. Install it instead:
npm install -g vercel
The -g flag installs the module globally and if the module has a CLI it will be available globally as well (note that depending on your setup you may need admin/sudo privileges to use the -g flag). Now you can run vercel by simply typing:
vercel deploy
This works in all operating systems supported by node.js and npm. That means you can even do this in Windows. In fact I use npm to distribute my tools in a simple cross-platform way so I don't have to support multiple package managers like chocolatey (Windows), homebrew (Mac OS), deb (Debian based distros), rpm (Redhat based distros) etc. (npm does not require your software to be written in node.js - I have published packages on npm written in tcl and bash).
I've installed the expo CLI and am trying to use expo init to start a project. When I do, this is returned:
bash: expo: command not found
I saw that this required updating the .bash_profile with export PATH=$PATH:~/node_modules.
However, apparently Mac OS Catalina switched from .bash_profile to zprofile or zshrc. Advice online said one should instead add PATH=$PATH:~/node_modules to the end of zshrc.
I tried doing this, but it says the file is locked. When I try to edit it, this pops up:
You don’t own the file “zshrc” and don’t have permission to write to it.
Any ideas how to move forward to fix this?
P.S. I installed anaconda a while ago and saw that the .bash_profile had this:
# added by Anaconda3 5.0.1 installer
export PATH="~/anaconda3/bin:$PATH"
# Setting PATH for Python 3.6
# The original version is saved in .bash_profile.pysave
PATH="~/Frameworks/Python.framework/Versions/3.6/bin:${PATH}"
export PATH
This might be a problem? I updated the file with the new path, but expo still was not recognized. That's when I found out Catalina switched to zprofile & zshrc.
I've been stuck on this for a long time and tried a bunch of things -- any advice would be greatly appreciated!
You're not using ZSH, if you were, you'd get zsh: command not found: expo. You could either switch to using zsh using chsh or keep using Bash.
Then you should add the PATH modifications (export PATH ...) to the appropriate shell config file .bash_profile or .zshenv, by running sudo vim ~/.bash_profile or sudo vim ~/.zshenv, or if you have VSCode, its probably easier with sudo code ~/.zshrc
The phpBB Vagrant.md document doesn't tell you what to do to get started beyond downloading/cloning the Git repo to your local machine, then running vagrant up to start the VM. However, I am currently greeted with the following error when attempting to start up the VM.
λ vagrant up
Vagrant failed to initialize at a very early stage:
There was an error loading a Vagrantfile. The file being loaded
and the error message are shown below. This is usually caused by
a syntax error.
Path: C:/Users/Phillip/Desktop/phpbb/Vagrantfile
Line number: 0
Message: LoadError: cannot load such file -- C:/Users/Phillip/Desktop/phpbb/phpBB/vendor/laravel/homestead/scripts/homestead.rb
I am on Windows 10, have Ruby 2.5.1 installed, and Vagrant which all work currently. However, that directory in the project is currently missing. Do I need that file to get this all working, or should I just create my own Vagrantfile using the INSTALL.html docs and go that route?
You just need to install all of the dependencies with composer.
As written in the readme (https://github.com/phpbb/phpbb/tree/master):
To be able to run an installation from the repo (and not from a pre-built package) you need to run the following commands to install phpBB's dependencies.
cd phpBB
php ../composer.phar install
If you don't have Composer for Windows, you can just download and install the exe on the official page
After this you can run vagrant up from the primary folder and it should work.
I'm trying to install a AUR package.
It seems easy, and I follow the Wiki description for it.
I downloaded the tarball, did makepkg -S to download the source and build it.
Apparently no error messages at output.
The process created some tar.gz files, that I tried to target when I use pacman -U
But none of them is the file expected by this command,
'missing metadata package in' ....
I did a research on web. I found that the place that makepkg output the package for Pacman is set in makepkg.conf, using PKGDEST item.
I changed that in /etc/makepkg.conf. It didn't create any file in that place when I tried to make that AUR package again (makepkg -S -f).
How to find the package for Pacman? Did the build go wrong and have no obvious message?
--Well .. after hours of search.. i give up and installed yaourt.. using that this to insall my package
According to https://wiki.archlinux.org/index.php/Makepkg and my firsthand experience, they are put into the working directory by default:
Next, one can configure where source files and packages should be placed and identify themselves as the packager. This step is optional; packages will be created in the working directory where makepkg is run by default.
When I try to compile a Notification Center widget for iOS 5 using
cd <name>
make package
then I get the following error:
make package requires dpkg-deb.
make: *** [package] Error 1
But I have installed dpkg-deb using
sudo su
<enter your password>
cd /bin
curl http://debmaker-osx.googlecode.com/svn-history/r5/trunk/dpkg-deb > dpkg-deb
And I have navigated to the /bin directory and the dpkg-deb file exists in the folder. What can I do to make it work? I have followed this tutorial on how to install theos, dpkg-deb and how to create a WeeAppPlugin, I'm just stuck at compiling the bundle... http://weeplugins.com/blog/?p=1
Update:
It seems like I cannot access the /bin/dpkg-deb file if I run this command
cd /bin/dpkg-deb
I get an error that I don't have permission to access the file. Is it possible to maybe move the file to another folder so that i can access it?
Along with MacPorts I also had to install the Xcode command line tools and Fink http://www.finkproject.org/
You can try to do "sudo make package". This will give you superuser permissions.