How can I add dependancy files in Debian Package in Ubuntu? - linux

I am trying build a debian package with some dependencies... Let me know how can I add dependencies into it. I have tried putting it in control file... but it is not working.. i am following this link:
http://www.webupd8.org/2010/01/how-to-create-deb-package-ubuntu-debian.html

In your debian/control file you need a line that looks similar to this:
Depends: foo, bar, baz(>=1.0)
Edit: dpkg -i does not download dependencies only apt-get does that. You normally need to run sudo apt-get install -f after you used dpkg -i unless you add your package to an apt repository and install it from there

Related

What are the dependencies for installing vscode 1.32 on ubuntu14.04

I want to install the latest vscode on ubuntu 14.04,
what are the dependencies for that?
I don't have sudo so I have to handle all the dependencies manually.
So I thought maybe someone can share all them so I wont have to find out 1 by 1.
You can simply download the zip archive version and extract it to destination folder and then run the startup script usually named code from its bin folder.
I assume that you want to install Visual Studio Code.
So for the latest stable version, just visit the official download page and choose the architecture (64bit or 32bit) you need. By default Ubuntu 14.04LTS uses apt as package manager, so you'll need the .deb file.
Once the download finished, open your download folder (or wherever your downloads are stored). There right click and choose Open in Terminal.
Now you can install VSCode by executing the following command (the file name could differ):
$ sudo dpkg --install code_1.32.2-1552488294_amd64.deb
If there are some unsatisfied dependencies, you will get an error. In this case type in the following:
$ sudo apt -f install
Then apt will automatically install the missing packages and finish the installation of VSCode. It will also add a .list file to your /etc/apt/source.list.d folder, so that VSCode will always be updated from the official repository when you execute sudo apt update and sudo apt upgrade.
Edit:
The dependencies are:
libnotify4
libnss3 (>= 2:3.26)
gnupg
apt
libxkbfile1
libsecret-1-0
libgtk-3-0 (>= 3.10.0)
libxss1

Installing vscode .deb package using terminal in ubuntu 18.04

I want to install Visual Code in ubuntu-18.04 with .deb package, i used: dpkg -i <file name.deb> i also tried: apt-get install -f
but it says it needs libconf-2-4, and libconf-2-4 needs more things...
Is there any way to install all of the dependencies together?
You can use apt for installing a package file, e.g.,
apt install ./filename.deb
The "./" helps it see that is just a package file, and after that it will continue by evaluating dependencies.

How do I download, modify, then install a debian package?

I'd like to run nginx on a jessie server with the pagespeed module compiled into nginx.
Instead of starting from scratch for my build script, I'd like to add the pagespeed module to the build script that is run when I execute apt-get install nginx. Then compile and set up nginx from this modified script.
But, I have no idea how to get the 'source code' or what the right technical terms to search for are for completing this.
Get the source package:
sudo apt-get build-dep <package>
Get the build dependencies
sudo apt-get source --compile <package>
You can fix a package bug by:
dpatch-edit-patch somebug.dpatch
And build the modified package:
debuild -b -uc -us
Installing the modified package:
sudo dpkg -i ../package_<your arch>.deb
Have a look at Debian Building Tutorial.
Hope this helps.

gcc-4.7 with Debian 8 Jessie

I use debian 8 Jessie, which has only gcc-4.9 available in the repositories. I tried to install gcc-4.7 in two ways without success.
First try
I tried installing gcc manually by downloading the file gcc-4.7.0.tar.gz
But when I install the dependency libraries (apt-get install Libmpc-dev libmpfr-dev libgmp-dev gcc-multilib)
the Debian installs, without asking gcc-4.9 and the compatible libraries with gcc-4.9.
I try run make for manual installation, but errors occur and it is not possible to install manually.
Second Try
I tried adding PPA repositories with gcc-4.7, in the file /etc/apt/sourc.list
Add-apt-repository ppa: ubuntu-toolchain-r / test as it teaches in this Link: https://askubuntu.com/questions/193513/problem-adding-a-ppa-to-install-gcc-4-7
When try apt-get install gcc-4.7 you are prompted to install several Dependencies ... when requesting to install the dependencies, the Below.
Root # vmhp110deb8: / home / user1 # apt-get install gcc-4.7 gcc-4.7-base
Reading package lists ... Done
Building dependency tree
Reading state information ... Done
Note, by selecting 'gcc-4.7-base' for regex 'gcc-4.7'
Package gcc-4.7-base is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
Is available from another source
E: Package 'gcc-4.7-base' has no installation candidate
Root # vmhp110deb8: / home / user1 # add-apt-repository ppa: ubuntu-toolchain-r / test
I tried to find a repository that has gcc-4.7-base, but then it asks Installation of other dependencies, and informs that it has not found
Libraries are Obsolete, etc.
Attempt not yet tested
Another idea that i had is download the Debian 7 Wheezy DVD (which I think Which has gcc-4.7 and all dependencies) and add as repository, For debian to find all dependencies of gcc.4.7 on DVD. But this idea i not have tested yet.
Could anyone help me with how I could install gcc 4.7 on debian 8?
As you can read here
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=765379
gcc-4.7 is not included in Debian Jessie
Maybe you can try this
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-4.7
EDIT : You already tries this. I didnt notice.
Try this manual:
http://charette.no-ip.com:81/programming/2011-12-24_GCCv47/
I hope this helps to you :)

How to make Debian package install dependencies?

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.

Resources