I need to install the file 'html.sty', but don't know what package it's in. I think I need to install something called latex2e, but I don't know what package has that.
You can find some information about installing LaTeX at https://help.ubuntu.com/community/LaTeX, although I have to wonder why you would need the file html.sty (a LaTeX style file) if you don't already have LaTeX installed. But anyway: probably the simplest way to install LaTeX and a lot the associated stuff you might or might not use with it, is
sudo apt-get install texlive-full
EDIT: According to some Google search results I just found, html.sty comes with the package latex2html. Running
sudo apt-get install latex2html
should suffice to install it.
Related
I am quite new to Linux and Apt package manager. I try to build my first docker image (write my first Dockerfile) based on other Dockerfiles written by co-workers for other projects. I came across these commands and however I tried to google them separately one-by-one, as a Linux newbie I still don't really understand what are the differences between them or which one should I use or should I use them all together?
This is a piece from the Dockerfile:
RUN rm -rf /var/lib/apt/lists/*; \
apt-get purge -y --auto-remove; \
apt-get autoremove; \
apt-get clean;
Could you please explain briefly what is the difference?
The differences between the command you metioned are described as follows. Hope these can help you a little.
apt remove
remove is identical to install except that packages are removed instead of installed.
It will remove the binaries, but leave configuration files, data files, and dependencies installed with it on installation time untouched.
apt purge
purge is identical to remove except that packages are removed and purged (any configuration files are deleted too).
It will remove about everything regarding the package, but not the dependencies installed with it on installation, which is particularly useful when you want to “start all over” with an application because you messed up the configuration.
However, purge won’t touch configuration or data files inside the user’s home folder (e.g. /home/User/hiddenFolders). There is no easy way to get those removed as well.
Note that other tools like aptitude will only remember dependency information for packages that it has installed.
apt autoremove
autoremove is used to remove packages that were automatically installed to satisfy dependencies for other packages and are now no longer needed.
In other words, it will only goes through the catalog and remove any left over packages that were not directly installed and that are not required by packages that are installed. Say that you install apache, it will install a lot of libraries. If you remove apache, all these libraries will be left behind until you run autoremove.
The only thing you should watch for, is if you started using one of the dependencies say “Python” but never actually installed it yourself; then it will be removed.
apt clean
clean clears out the local repository of retrieved package files. It removes everything but the lock file from /var/cache/apt/archives/ and /var/cache/apt/archieves/partial/.
apt autoclean
Like clean, autoclean clears out the local repository of retrieved package files. The difference is that it only removes package files that can no longer be downloaded, and are largely useless. This allows a cache to be maintained over a long period without it going out of control.
Extra
This part of contents is not closely related to the question, but I think it's necessary to give you some extra suggestions.
Do not remove files belonging to packages without using the package manager! It will get confused and is the wrong way to do things.
If you don’t know to which package a file belongs, try this:
dpkg -S /path/to/file
For some applications compiled from their source codes, the best way is to refer to its README, and remove it manually.
I have a system setup of Haskell that I've maintained with Homebrew and subsequent cabal install invocations for various packages. I would like to take this back to the bare installation created with brew install haskell-stack.
How do I do this? Right now I seem to have a bunch of stuff lying around (e.g. old docsets, executables like ghc-mod etc.) at the system level, even after deleting all installed packages with rm -r ~/.ghc. Is there a reliable way to get back to the basic configuration that brew install haskell-stack creates?
I use Ubuntu 15.04.
I wanted to install PSpice, but I needed a program that would run .exe; I found out about Wine, and so tried to install it like this:
sudo apt-get install wine
Everything was working fine, I watched it download and install a TON of packages. However, a screen popped up asking for agreement to Eula software terms. There was no way to accept, so I had to end the process by closing the terminal with the "x" button (which locked up dpkg).
I removed the lock file from /var/lib/apt/lists and /var/cache/apt/archives, and killed the process that had locked dpkg (am I phrasing that correctly?).
So now, the ship is running smoothly, but I want to remove all of the packages that are associated with Wine.
I tried:
sudo apt-get --purge remove wine
I got a message saying "wine not installed".
There must be some way to identify all the packages in /var/cache/apt/archives that are directly associated with Wine, and subsequently remove them.
I'm relatively new to this, please be EXTRA thorough in your help.
First, your system runs fine, wine doesn't exist on it any more, so there isn't too many to do. What I understand you actually want an afterparty cleanup after your wine try.
Wine hasn't too many dependent packages and they don't harm too many. In similar cases, if there is a large software system from a lot of packages, there is a common package on which all of them depends. For example, in case of X it is x11-common, removing it with apt-get --purge remove cleans up your whole system from the X entirely. You can find this by calling some dpkg -s on some packages recursively, and see where is this "common denominator".
But in the case of wine it isn't the case, wine depends only on some libs. Your system now works, maybe the recursive removal of ~/.wine would be useful (here are all of your wine settings, even your virtual C:).
apt-get --purge autoremove removes all of your packages which were installed as a dependency (thus, not directly by apt-get install), and whose original package doesn't exist any more.
deporphan is also a useful tool, it finds packages who aren't dependency of anything and seem seamlessly uninstallable.
dpkg -l|grep wine shows every package whose name or short description contains the wine string, maybe some wine-common or similar package does exist yet.
sudo apt-get remove --autoremove wine-stable wine-stable-amd64
use this command to remove wine completely
To install additional packages for Cygwin, do I just need to run the setup.exe again and choose from the packages list?
Also, doing this won't harm my computer in terms of 2 Cygwin instances being installed or problems of that kind (I'm kind of a noobie with these things).
Last, there is no package manager in Cygwin which you can run in the command line? Something similar to Pip in Python.
No, adding additional packages doesn’t modify the current settings. There is a
package manager called apt-cyg which installes additional packages from
command-line. To install apt-cyg follow the below steps:
wget rawgit.com/transcode-open/apt-cyg/master/apt-cyg
install apt-cyg /bin
Note: wget should be installed for downloading the apt-cyg. To Use apt-cyg for
installing additional package (after following the above steps):
apt-cyg install ncurses
No, it doesn't hurt the current setup. The install program knows what's installed already.
Having said that, I long ago got into the habit of installing all of Cygwin since, despite its size, it's still minuscule compared to the size of modern hard disks. That way, you won't ever have to worry about whether a package is installed or not.
Re-run the setup executable like "cygwin_setup-x86_64.exe" should do it.
"Install from Internet"
Accept your existing root directory (from your existing installation)
Use your existing "Local Package Directory"
On the screen, view "Full"
Search for the new package you want to add
Go through the installation
Additional option, may be helpful for someone:
To install additional packages in windows from windows command line you can use your cygwin installer.
I suppose, you've already downloaded it to install cygwin from here https://cygwin.com/install.html.
$ setup-x86_64.exe -q -P graphviz
see this guide for details:
http://preshing.com/20141108/how-to-install-the-latest-gcc-on-windows/
There is no package management in Cygwin outside of the setup program. The setup only applies updates to your current installation, it does not overwrite packages than what you already have.
So if you want new packages just rerun the setup program to install packages.
You can just look for the package binaries and decompress them in the C:\cygwin\bin folder.
I did that for dos2unix ( https://cygwin.com/packages/summary/dos2unix.html ) and trying it out now.
I want to make a simple Debian package to install a simple tool that depends on Qt4 libs.
In control file I have defined that it depends on Qt4 libs however, by the time I'm testing the package it says that the dependency could not be met.
Question:
How can I make Debian trigger apt to install the dependencies as well?
Can't find that the documentation however I know that apt-get does that.
If you want to avoid creating a local APT repository, you can do:
dpkg -i mypackage.deb
apt-get install --fix-missing
If you do want to create a local repository, you can use reprepro for this.
If you install it via dpkg it won't work because dkpg doesn't know where to find additional dependencies. You could do it via apt-get if you build your own repo, but it's kind of time-consuming the first time (it's not difficult, just something "new" the first time that needs some time to be learnt).
On the other hand, and the solution you are probably looking for is gdebi (you may need to install it: apt-get install gdebi-core). It's a tool that checks the dependencies for a package and calls apt-get to fetch and install them, and then calls dpkg to install your package.
Per #textshell in this answer:
starting with apt 1.1 (available in Xenial (16.04), stretch) apt install also allows local files:
sudo apt install ./foo-1.2.3.deb
So much simpler and cleaner.
See the release
announcment
This will also install dependencies, just like a normal apt install or apt-get install.
If you're creating the Debian package, you specify its dependencies in the debian/ directory control files; I believe debian/control takes Depends: directives for that purpose.
I don't know the details too clearly, myself, but there are instructions at http://www.debian.org/doc/manuals/maint-guide/ ; in particular, http://www.debian.org/doc/manuals/maint-guide/dreq.en.html#control seems to be the right place to start looking.
One way would be to create a local package repository on your computer and add it to /etc/apt/sources.list. Then you could install the package from your local repository with apt-get and have the dependencies resolved automatically.
There's probably an easier way to do it, but I don't know what that would be.