Can't compile .deb packages; make package command returns error - objective-c

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.

Related

Environment variables (zsh terminal) installed through npm on MacOS 12.4 Monterey - SOLVED

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).

html-minifier fails with "ERROR: The specified config file doesn’t exist or is unreadable"

I'm using the npm package "html-minifier" (v1.0.0) and am trying to run the command (from Linux Mint, on the command line):
html-minifier -c html-minifier.cfg -o lib/welcome.html client/welcome.html
However it fails with the error:
ERROR: The specified config file doesn’t exist or is unreadable:
/var/www/projectfolder/html-minifier.cfg
Despite the existence and readability of that file.
Why might that be happening?
I installed v0.8.0:
sudo npm install -g html-minifier#0.8.0
and then the command given in the question worked. Looks like it's a bug specific to v1.0.0. I've logged an issue against the project to get it resolved.

Deploying Laravel 4 with Capistrano. Permission denied during `composer install`

I'm trying to use Capistrano to deploy my Laravel 4 site and when I try to:
run "cd #{current_path} && composer install --no-dev"`
in my deploy.rb I get this error:
sh: 1: composer: Permission denied
and a few lines later:
failed: "sh -c 'cd /var/www/public/mysite/current && composer install --no-dev'" on root#my.ip.add.ress
If I comment out the run command above then Capistrano is able to complete the deployment successfully. However, I then have to manually run composer install from the current release directory of my site in order to get everything on my site working properly.
I've tried running my deploy with the -d flag to go through the deployment step by step, I've tried fixing permissions in case they were incorrect, but neither seems to fix this error. Also, I've looked all over for a possible answer and can't find anyone else with this specific issue.
So, I have two questions:
Any ideas of a fix to this?
It seems like running composer install each time I deploy is just creating more work than is necessary. Would it be better to either:
a) not ignore the vendor folderin my local repository therefore removing the need to runcomposer install` on each deploy? Or,
b) run composer install in the root directory (at the same directory level as current and releases) and then change the path to vendor/autoload.php in the bootstrap directory to point to this new directory so I never need to run composer install again?
I figured it out. Instead of:
run "cd #{current_path} && composer install --no-dev"
I'm doing this instead:
run "cd #{releases_path}/#{release_name} && php /usr/local/bin/composer/composer.phar install --no-dev"
(I changed #{current_path} to #{releases_path}/#{release_name} because Capistrano was executing rm -f /var/www/public/myapp/current AFTER the composer install command.

All AUR packages..after builded by makepkg .. necessarily create an *.pkg.tar.xz file?

Well .. this question came from another one closed question that i posted here. I installed android using yaourt.. and that was ok.. it worked fine.
But, before that i was trying doing manually.. using makepkg. But it seems that it did not create any package named *.pkg.tar.xz .
After a search.. and some question for my friends.. they told me that maybe the make process had problems and, it had some silent problem that not created the *.pkg.tar.xz.
So.. what do you think.. all AUR packages necessarily create *.pkg.tar.xz file and it was a problem when i was trying to build. Or has certain packages , as android , that do not create such *.pkg.tar.xz files?
An AUR package is a PKGBUILD file with instructions to makepkg to build a package (which is a .pkg.tar.xz file), so yes, unless there is any error on the build process, all AUR packages create a .pkg.tar.xz file.
You could try downloading the PKGBUILD file and running the makepkg -si manually to check any build error. Here's an example to build and install the android-sdk package, adjust accordingly to your desired package. This should create a android-sdk-*-x86_64.pkg.tar.xz file.
cd $(mktemp -d)
wget https://aur.archlinux.org/packages/an/android-sdk/android-sdk.tar.gz
tar xzvf android-sdk.tar.gz
cd android-sdk/
makepkg -si
Used arguments to makepkg:
-s, --syncdeps Install missing dependencies with pacman
-i, --install Install package after successful build

Urturn API ur: command not found

I am trying to install urturn api and write my own expression for urturn.com
following http://webdoc.github.com/urturn-expression-api/#!guides/start
After:
npm install urturn-toolbelt -g
I am trying to run sandbox with:
ur sandbox
and got error:
-bash: ur: command not found
Please help
P.S. I am on Mac Os
thanks
It is likely your nodeJS npm/bin folder that is not included in your PATH.
Can you check your PATH variable?
Node NPM package bin files are all symlinked in the same ./bin folder. If you installed NodeJS using Homebrew (brew install node), it should be /usr/local/share/npm/bin.
You can echo your current path using:
echo $PATH
If the folder above does not appear in the list, check your .bashrc or .bash_profile files and fix any problem.
A fix that is likely to work is to add the following line in ~/.bash_profile
PATH=$PATH:/usr/local/share/npm/bin