Can't use cyg-apt on cygwin 1.7 - cygwin

I've got an issue with the cyg-apt command (on cygwin 1.7 running on a Windows 7 64bits virtual machine)
I've followed these step in order to install cyg-apt correctly :
Install cygwin
Install wget and python
wget http://www.lilypond.org/~janneke/software/cyg-apt 1.1
Edit the cygapt file: Change the default server to other than the one in it. (I find ftp://ftp.cise.ufl.edu/pub/mirrors/cygwin/ to be good)
chmod a+rx cyg-apt
mv cyg-apt /bin
cyg-apt setup
cyg-apt update
And no matter what I try with cyg-apt (cyg-apt install package-name, cyg-apt man, even cyg-apt ...), this error appear everytime :
to rely on a native Windows version of Bonjour's mDNSResponder service.
Traceback (most recent call last):
File "/usr/bin/cyg-apt", line 658, in (module) get_setup_ini()
File "/usr/bin/cyg-apt", line 184, in get_setup_ini raise 'URG'
TypeError: exceptions must be old-style classes or derived form BaseException, not str
I've made some researchs and it could be link to an incompatibility with the 1.7 version of cygwin but nothing more helpfull.

You can do this using Cygwin's setup.exe from Windows command line. Example:
cd c:\cygwin
setup.exe -q -P wget,tar,qawk,bzip2,subversion,vim
For a more convenient installer, you may want to use apt-cyg as your package
manager. Its syntax similar to apt-get, which is a plus. For this, follow the
above steps and then use Cygwin Bash for the following steps:
wget rawgit.com/transcode-open/apt-cyg/master/apt-cyg
install apt-cyg /bin
Now that apt-cyg is installed. Here are few examples of installing some
packages:
apt-cyg install nano
apt-cyg install git
apt-cyg install ca-certificates

Possibly not exactly what you’re looking for, but perhaps abandon cyg-apt in
favor of apt-cyg. cyg-apt hasn’t been updated since 2009. Personally,
whenever I try cyg-apt update I get an error like this:
cyg-apt: bad URL http://www.gtlib.gatech.edu/setup-2.ini, exiting.
the apparent solution to which is to instead use apt-cyg.
apt-get for cygwin?

Related

python3: can't install psycopg2 [duplicate]

I cannot figure this out for the life of me.
When I pip install django-tenant-schemas it tries to install the dependency psycopg2 which requires the Python headers and gcc. I have all this installed and still keep getting this error!
./psycopg/psycopg.h:35:10: fatal error: libpq-fe.h: No such file or directory
So to install libpq-fe-h I need to sudo apt-get install libpq-dev..
..which returns..
libpq-dev is already the newest version (10.10-0ubuntu0.18.04.1).
Then when I sudo find / libpq-fe.h it doesn't seem to be in my OS.
I am lost at this point. If anyone can help I would highly appreciate it.
For some reason, the file is missing on the system.
As you're using apt-get, the system is dpkg based, presumably Debian or it's derivative. You can try the Ubuntu's package search to get which package contains a file with name ending in libpq-fe.h.
I found the package is libpq-dev and file's absolute path is /usr/include/postgresql/libpq-fe.h.
FWIW, on a dpkg based system, you can check which package gives a file if you know the file's absolute path:
% dpkg -S /usr/include/postgresql/libpq-fe.h
libpq-dev: /usr/include/postgresql/libpq-fe.h
Also, unlike find, locate keeps a cache of found files (mlocate.db) that is created everyday via cron; so if the file happens to be removed after the last run, you can run locate libfq-fe.h to get the absolute path to the file without needing to check the Ubuntu package search online.
So the package is libpq-dev. Now, reinstalling it will get everything to the default state i.e. all relevant files will be copied to the right places. As it is only a library package, no user/system level configurations will be overridden (and dpkg will prompt you for action for any package that does that).
To reinstall the package:
sudo apt-get install --reinstall libpq-dev
For me, I realized it was trying to use the deprecated setup.py so I installed wheel (pip install wheel) and that sorted it all out.
Well after installing these libraries
sudo dnf install python-virtualenv openssl-devel gcc libffi-devel libxslt-devel issue was not gone.
I used mlocate to find where libpq-fe.h file is located. On my system (Fedora 32) it was located at /usr/pgsql-10/include/libpq-fe.h
yum install mlocate
sudo updateb
locate libpq-fe.h
After all added this line to ~/.bash_profile
nano ~/.bash_profile
export PATH=/usr/pgsql-10/bin/:$PATH
Works fine, I can easily install psycopg2 without any trouble.
You need to create a LD_LIBRARY_PATH that indicates the path of your library /user/pgsql-11/lib
Source: The 3rd point of build prerequisites at https://www.psycopg.org/docs/install.html#build-prerequisites

zypper: command not found in SUSE linux

I was not aware that zypper is like yum for SUSE. I deleted that file from bin, now I am not able to install any application through it. I throws an error that
sudo: zypper: command not found
How do I install zypper back and make it work like as normal?
Depending on your system and architecture, find Zypper package file (RPM) in online repository (i.e. http://download.opensuse.org/distribution/13.2/repo/oss/suse/i586/ ), download it (wget) and install it (rpm -i) :
wget http://download.opensuse.org/distribution/13.2/repo/oss/suse/i586/zypper-1.11.14-2.1.i586.rpm
sudo rpm -ivh zypper-1.11.14-2.1.i586.rpm

How to install CLISP in Redhat Linux

I was searching, how to install CLISP (http://www.clisp.org) in RedHat Linux. In the CLISP web site Fedora installation link is broken.
yum install clisp doesn't work even though sudo apt-get install clisp in Ubuntu.
Anyone there, installed CLISP in RedHat Linux?
If you just want a CL-implementation you can use sbcl which will run standard CL-code as good as clisp.
If you want clisp download the tarball and follow the instructions in ihe INSTALL file.
There is a thread in the CentOS forums about a yum installation alternative, but it might not work on recent releases.
I just installed it on Fedora 18. Repo:
http://archives.fedoraproject.org/pub/archive/fedora/linux/releases/18/Everything/x86_64/os/Packages/c/
It has been moved to 'archives.fedoraproject.org' because it's old. So if you have an old fedora you might have to add this repo to your yum repos.
You can build from source, I just wanted to learn a little bit about lisp and this allowed me to get setup and get started:
You can find releases here: ftp://ftp.gnu.org/pub/gnu/clisp/release/
wget ftp://ftp.gnu.org/pub/gnu/clisp/release/2.49/clisp-2.49.tar.gz
tar xvfz clisp-2.49.tar.gz
cd clisp-2.49
./configure --prefix=$HOME --ignore-absence-of-libsigsegv
cd ./src
make install

how to update make 3.81 linux

I am new to Linux (new as in installed it yesterday), I need it for my programming course in the university and I've been told to install specific versions of specific programs, but though I've used apt-get install to install them (having previously done apt-get update) they aren't in the correct version.
The programs that I need are make 4.0 and valgrind 3.10.1.
apt-get installs make 3.81 and valgrind 3.10.0.SVN.
I have tried typing "apt-get install make4.0" and "apt-get install valgrind10.3.1" to no avail. I have downloaded them from the internet and followed what instructions I could understand to install the newer versions but it keeps saying that I have the older ones. (I'm not sure if I can post direct links here, if I can let me know and I'll post where I got them from).
What have I been doing wrong? How can I fix this?
I am currently running Linux Mint.
Thanks for any answer in advance.
Due to a long-standing unresolved Debian bug report, GNU Make remained the age-old 3.81 in Debian for a very long time, and as a consequence, in Debian-based distributions such as Ubuntu and Mint.
The latest Debian release, Jessie, has upgraded to 4.0, so Debian-based distributions will have that upgrade. However, it is better to use 4.1.
This has been discussed many times on the GNU Make mailing list and elsewhere.
So to get a newer version, you must compile it from scratch.
This is easy:
Install the required packages (gcc, make and such).
Open up a shell (if you're using the GUI, a terminal window).
Type the following commands (or something equivalent, e.g. you can use curl instead of wget):
cd /tmp
wget http://ftp.gnu.org/gnu/make/make-4.1.tar.gz
tar xvf make-4.1.tar.gz
cd make-4.1/
./configure
make
sudo make install
cd ..
rm -rf make-4.1.tar.gz make-4.1
Now, make 4.1 is in /usr/local/bin/make.
You can verify it is there with whereis make.
You can make it your default make by prefixing /usr/local/bin to your $PATH variable in your shell startup file; for instance, in .profile or .bashrc if you use the bash shell.
Don't try to install a self-compiled make (or anything else that doesn't come from the distribution's package manager) into /bin or /usr/bin; doing that will confuse your package manager.

apt-get for Cygwin?

Is there any apt-get-like program for use with Cygwin?
I already tried cyg-apt but when I try I get this error:
cyg-apt: downloading: http://cygwin.mirrors.pair.com/setup-2.bz2
cyg-apt: downloading: http://cygwin.mirrors.pair.com/setup-2.ini
cyg-apt: bad URL http://cygwin.mirrors.pair.com/setup-2.ini, exiting.
Best I have ever used:
apt-cyg package manager
You can do this using Cygwin’s setup.exe from Windows command line. Example:
cd C:\cygwin64
setup-x86_64 -q -P wget,tar,gawk,bzip2,subversion,vim
For a more convenient installer, you may want to use the
apt-cyg package manager. Its syntax is
similar to apt-get, which is a plus. For this, follow the above steps and then
use Cygwin Bash for the following steps:
wget rawgit.com/transcode-open/apt-cyg/master/apt-cyg
install apt-cyg /bin
Now that apt-cyg is installed. Here are a few examples of installing some
packages:
apt-cyg install nano
apt-cyg install git
apt-cyg install ca-certificates
Update: you can read the more complex answer, which contains more methods and information.
There exists a couple of scripts, which can be used as simple package managers. But as far as I know, none of them allows you to upgrade packages, because it’s not an easy task on Windows since there is not possible to overwrite files in use. So you have to close all Cygwin instances first and then you can use Cygwin’s native setup.exe (which itself does the upgrade via “replace after reboot” method, when files are in use).
apt-cyg
The best one for me. Simply because it’s one of the most recent. It works correctly for both platforms - x86 and x86_64. There exists a lot of forks with some additional features. For example the kou1okada fork is one of improved versions.
Cygwin’s setup.exe
It has also command line mode. Moreover it allows you to upgrade all installed packages at once.
setup.exe-x86_64.exe -q --packages=bash,vim
Example use:
setup.exe-x86_64.exe -q --packages="bash,vim"
You can create an alias for easier use, for example:
alias cyg-get="/cygdrive/d/path/to/cygwin/setup-x86_64.exe -q -P"
Then you can for example install the Vim package with:
cyg-get vim
you can always make a bash alias to setup*.exe files in $home/.bashrc
cygwin 32bit
alias cyg-get="/cygdrive/c/cygwin/setup-x86.exe -q -P"
cygwin 64bit
alias cyg-get="/cygdrive/c/cygwin64/setup-x86_64.exe -q -P"
now you can install packages with
cyg-get <package>
This got it working for me:
curl https://raw.githubusercontent.com/transcode-open/apt-cyg/master/apt-cyg > \
apt-cyg && install apt-cyg /bin
No. The only officially supported tool for downloading and updating Cygwin packages is the setup.exe file you used for the initial install, although that can be invoked with command line arguments to help the process.
From that same page:
The basic reason for not having a more full-featured package manager is that such a program would need full access to all of Cygwin's POSIX functionality. That is, however, difficult to provide in a Cygwin-free environment, such as exists on first installation. Additionally, Windows does not easily allow overwriting of in-use executables so installing a new version of the Cygwin DLL while a package manager is using the DLL is problematic.
You can use Chocolatey to install cyg-get and then install your packages with it.
For example:
choco install cyg-get
Then:
cyg-get install my-package

Resources