apt-get not working in Cygwin - windows

I'm something of a Cygwin newbie, so that might be the problem, but I'm trying to install a package using apt-get and it's telling me there's no such command. I installed it on Windows 7.
The best I got from searching other questions here and across the net was that you need to install something specific (or run the setup file to update) when initially installing, but it's not clear to me what I need to install or run or whatever.
How do I install or update my cygwin to be able to use apt-get or, alternatively, how would I install packages with the basic, default installation of Cygwin that I already have?
Thank you.

You can use this : apt-cyg
It works just like apt-get in terms of command line arguments, but you will be using apt-cyg instead.

Refer https://github.com/transcode-open/apt-cyg It did helped me.
To install apt-cyg package.

Cygwin's official installer is setup.exe. This is the "proper" way to install Cygwin packages. There's a project called cyg-apt but it's not officially part of Cygwin.

Related

How to install eclim with brew or other package manager?

I am trying to install eclim to my system for code completion in vim. But as far as the eclim website has mentioned, the only installation method seems to be downloading the bin or source code to your system and executing the installation command manually. But I really hate installing stuff in this way as it pollutes your system directories. I tried to use brew but there doesn't seem to be a formula named "eclim". So is there really no way for me to install eclim with a package manager on mac?
I tried to use brew but there doesn't seem to be a formula named "eclim". So is there really no way for me to install eclim with a package manager on mac?
Write the missing formula.

Installing packages through bash scripting

I have never written any bash scripts at this point and my understanding of them is still pretty green. I was curious after reformatting my Mac if it is possible to write a script that does the majority of installs in an automated fashion?
For instance I use homebrew so maybe a portion of the script could verify if this is on the Mac and if not then initiate the install. Then it could proceed with the list of brew install & brew cask installs.
This is something that after realizing how much I had installed and had to remember and still am remembering to install I think would be pretty cool to make...I just don't know if a) it's possible with the macOS or how-to (I'll read up on the how-to). I'm not even too sure if bash-scripts would be the thing to use for something like this or not. Thanks in advance for any information!
on an RPM based system I would eventually list the packages installed, backup the list and then chain it in a yum install command.
For instance:
yum list installed
A
B
C
then to reinstall
yum install A B C -y
Extremely easy and straight forward.
I do believe you can do the same with brew:
brew list
brew install based on the list
I hope this helps

python3-pip installed but pip3 command not found?

I am testing a Python3 program in several computers. To do that, I need to install a library of Python with pip3.
So first, I was installing python3-pip in each computer (everyone is running a Kubuntu OS). Everything was OK, and then I installed the package I needed with pip3, and I managed to do that except for one computer.
In that computer, python3-pip was apparently installed succesfully, but when I look for the package, I get this error (the translation is homemade):
Command «pip3» was not found, may be you wanted to say:
The command «pip» from the package «python-pip» (universe)
pip3: command not found
By the way, I had asked this question here https://superuser.com/questions/769920/python3-pip-installed-but-pip3-command-not-found too. There is an answer which has several votes, in my case, may be I was doing something wrong but it not worked. But try it, may be you are luckier than me!

sudo command not found on Cygwin

I am currently trying to install and update a few packages on a Windows OS. The only matter is that I am using Cygwin in order to type the commands through a terminal (as I'm aware, I can type in Linux type commands such as cd, ls etc. on Cygwin - I may be wrong). However, when I try to install a package like:
sudo apt-get install paparazzi-dev
I get the reply:
-sh: sudo: command not found.
Does anyone have an idea as to how I can fix this problem?
Run cygwin as administrator.. then you wouldn't need any sudo command.
Cygwin is not a full Linux distribution. Therefore you don't have sudo or the Debian/Ubuntu package manager apt-get. There is a number of packages available from the Cygwin repository: http://cygwin.com/packages/
You have to chose these packages during setup.
Windows does not have sudo, apt, or almost any Linux commands to be exact. Cygwin may allow some, but as programs are not installed on Windows as packages apt-get will not work. Windows programs have installers as .exe or .msi instead.
The Windows version of sudo is called runas in case you need to run something as another user. Or, you can run Cygwin as administrator.
If you have to use the packages you need Linux. You can install it directly to replace Windows, dual-boot or use a virtualization software like VMware VirtualBox.
Making out an explanatory answer from answer here by #Aimal as it worked for me.
Cygwin may not get permissions to create folders and files when run by clicking Cygwin icon that's in normal mode.
Cygwin gets the right authorization only when right click -> "run as adminitrator" on cygwin icon because of that it gets permissions to create folders and files.
Cygwin lets you run certain commands, such as cd, ls, or mv; but it doesn't let you run other commands, such as sudo or apt-get.
If you're trying to add a package to your Cygwin installation, rerun Cygwin Setup. It may still be in your "Downloads" folder. Go through all the steps again. The Cygwin installer will automatically download and install the package you want, and add it to your Cygwin installation. (I think it will probably also upgrade all your other installed Cygwin packages to the latest available versions.)
If your desired package isn't on the Cygwin package list but is on the Cygwin Ports package list, follow the Cygwin Ports installation instructions. Note that Cygwin Ports is separate from Cygwin. Please do not send messages about Cygwin Ports packages to the cygwin.com mailing lists.
If you have years of Linux experience, you may be able to compile the software you want inside Cygwin. This can be challenging.
Perhaps an option simpler than "compile it yourself" is this: You can install VirtualBox, then install your favorite Linux distribution inside the virtual machine, then install your desired package inside Linux. (I like Ubuntu Linux, which has more than 27,000 packages in its "Universe" repository.) Now you can run Linux and Windows at the same time.
I think I tried steps below after doing some research & succeeded (on windows)
1.Install scoop using powershell 3 (iex (new-object net.webclient).downloadstring('https://get.scoop.sh'))
2. do scoop install --global sudo
3. make sure paths (C:\Users\\scoop\shims & C:\ProgramData\scoop\shims) added in environmental path variable.
In my case, I wanted to install curl, but could not create directory /usr/local/curl/lib when running command "make install", because of permission deny. so i need to change /usr/local permission. when i run sudo chmod 755 /usr/local, sudo command not found.
after searching a few solution, found that sudo is not installed by default in Cygwin. But I tried the solution that Aimal gave which is to run Cygwin as administrator. I finally can change the folder permission. Thanks Aimal.

Mountain Lion : Apt-get command not found

I am trying to install KDE Desktop using command : sudo apt-get install kde-plasma-desktop. However, I keep getting error 'apt-get' Command not found. I tried installing flink and checked if it works. But I still get the same error. Can anyone help me with this please ?
Many Thanks.
It looks like you're on a Mac. apt-get is a Debian command for Debians package manager.
If you want a Linux-like package manager on your Mac, you can try Homebrew.
Try using brew install. This seems to work for me to replace apt-get.

Resources