install avrdude on Ubuntu without libftdi1 ? - Page 1
Forum section: electronics / general

author: jmelson
author_rank: Super Contributor
timestamp: March 15, 2020, 05:08:07 pm
content: Hello,I have installed avr-gcc and related tools on my Ubuntu precise system (yes, I know it is old, but I have so many tricky packages working on it...)but I can't get avrdude to install. The error is :The following packages have unmet dependencies:avrdude : Depends: libftdi1 (>= 0.19) but it is not installableE: Unable to correct problems, you have held broken packages.I've tried a bunch of things to fix this, but they don't seem to help. Anybody know what to do? And, strangely, synaptic says there are NO broken packages. Searching through /var/lib/dpkg/status also does not show any with status not = OK.Alternatively, is there a way to install avrdude without the usb/ftdi packages, and just use the parallel port? For an ATTINY13A, that should be no problem at all.Thanks,Jon

author: Nominal Animal
author_rank: Super Contributor
timestamp: March 16, 2020, 05:11:19 pm
content: You could install it usingapt-get --ignore-missing avrdude(ordpkg --ignore-depends=libftdi1 avrdude-*.debif installing from a file). Whether the binary works without the ftdi library present, I am too lazy to check, but I do believe it will work just fine.Personally, I'd just download thesourcesforavrdude-6.3, and either compile a local binary to use, or rebuild the package using the Ubuntuavrdude_6.3-4.debian.tar.xzadditions.To compile the basic local binary, you need to havelibusb-devandlibelf-devpackages installed first. Then, in the directory where the source .tar.gz archive is in, runCode:tar -xf avrdude-6.3.tar.gzcd avrdude-6.3./configure --prefix=/usr --sysconfdir=/etc --enable-linuxgpiomakemake installwhich installs the binary, man pages, et cetera. You can modify the configure line, to control where it will be installed. If you only want theavrdudebinary without the man pages, instead of themake installcommand, runCode:sudo install -o root -g root avrdude /usr/binAlternatively, to rebuild the package but without libftdi1, you need to havebuild-essentials,devscripts, and various development packages installed. Then, instead of above commands, you runCode:tar -xf avrdude-6.3.tar.gzcd avrdude-6.3tar -xf ../avrdude_6.3-4.debian.tar.xzsed -e '/libftdi/ d' -i debian/controldebuild -i -us -uc -bThis should eventually finish, with a file calledavrdude_6.3-4_*.debin the original directory (one up,cd .., the directory with the .tar.gz and .tar.xz files). You can install this using e.g.dpkg -i ../avrdude_6.3-4_*.debfor example; it is a perfectly normal unsigned software package, you just built it yourself.

author: jmelson
author_rank: Super Contributor
timestamp: March 18, 2020, 07:56:26 pm
content: Quote from: Nominal Animal on March 16, 2020, 05:11:19 pmI tried several variants of this but they all give the same error, and no installed program.I do have several other computers that it installed correctly on.Thanks,Jon

author: hli
author_rank: Frequent Contributor
timestamp: March 18, 2020, 08:16:32 pm
content: You can useaptitudeto get more details about why libftdi is not installable. Or why your avrdude wants to see a specific version range (on my current Ubuntu there is no such requirement). Could it be that you want to install avrdude from a different package repo than your Ubuntu? In that case it might just be too new for your (veryold) ubuntu version ('Precise' is 12.04 - are you really sure you don't want to update?).

author: Nominal Animal
author_rank: Super Contributor
timestamp: March 18, 2020, 09:39:40 pm
content: Quote from: jmelson on March 15, 2020, 05:08:07 pmOops, missed this line. It indicates your package management is b0rked, and you cannot installanything. What doesCode:sudo apt updateoutput?Note that you should not run any apt commands while you have Synaptic open, and vice versa.Edited to add: Ah yes, I think I now understand. Please runCode:sudo apt-get install --fix-broken --reinstall libftdi1sudo apt-get cleansudo apt-get updatesudo apt-get install avrdudeThe first command should reinstall libftdi1 package, fixing the apt database as well. I assume that there is no reason why you don't have it installed, it just happens to be the package for which your apt database was b0rked, for whatever reason.The second and third commands should drop any already downloaded packages (in case the b0rkage was due to a transfer problem), and reload the package indexes from your repositories.The fourth command should install avrdude normally.

author: jmelson
author_rank: Super Contributor
timestamp: March 19, 2020, 12:05:40 am
content: Note this is a Precise (Ubuntu 12.04) install, so the command is apt-get update, and it runs with NO errors!sudo apt-get install --fix-broken --reinstall libftdi1 gives :E: Package 'libftdi1' has no installation candidateaptitude is not available for precise. Synaptic says there are no broken packages, and grepping through/var/lib/dpkg/status also shown none that are not Status: OKThanks,Jon

author: Psi
author_rank: Super Contributor
timestamp: March 19, 2020, 12:10:44 am
content: Did you recently edit /etc/apt/sources.list and add a new source to it?You can mess things up if you accidentally added a source for a different version of Ubuntu than what you are running, and then you apt-get installed or upgraded packages intended for a different version.Just double check you have all your sources defined correctly in sources.list, you might be missing some or have some pointing to the wrong repo.If you have other 12.04 systems check what their sources are and how they compare to this pc.

author: Nominal Animal
author_rank: Super Contributor
timestamp: March 19, 2020, 12:39:52 am
content: I checked:avrdudewill not work withoutlibftdi1, if compiled with it enabled. It'll just fail with an"avrdude: error while loading shared libraries: libftdi.so.1: cannot open shared object file: No such file or directory"error.You need to recompile avrdude. What architecture are you running on (i.e., what doesuname -aoutput)? I guess I could set up a virtual machine with a similar enough Precise with the development environment, and rebuild the avrdude package for you.

author: Psi
author_rank: Super Contributor
timestamp: March 19, 2020, 12:40:55 am
content: There's no point trying to recompile avrdude atm, he needs to fix his broken packages first

author: Nominal Animal
author_rank: Super Contributor
timestamp: March 19, 2020, 01:03:57 am
content: You're right, Psi. Precise Pangolin does havelibftdi1version 0.19-4 available.The root cause of the issue is that OP does not have all repositories correctly configured, probably because support for Precise Pangolin has ended years ago; I don't think any of the package repositories are available anymore.Because apt cannot access a repository that has libftdi1 for their hardware architecture, they cannot install avrdude either.The solution is to either add a valid Precise Pangolin package repository (with libftdi1 in it), or download and install the Precise Pangolin libftdi1-0.19-4 deb package (somehow).I believe, but am not sure, that for i386 the needed packages arelibftdi1_0.19-4_i386.deb, possiblylibusb-0.1-4_0.1.12-20_i386.deb, andavrdude_6.3-4_i386.deb; and for x86-64,libftdi1_0.19-4_amd64.deb, possiblylibusb-0.1-4_0.1.12-20_amd64.deb, andavrdude_6.3-4_amd64.deb. (After downloading the correct packages, you can install them withsudo dpkg -i *.deb)

author: jmelson
author_rank: Super Contributor
timestamp: March 19, 2020, 01:18:52 am
content: OK, some more fooling around with /etc/apt/sources.list got all the right repositories pulled infixed it. Now, I have libftdi1 and avrdude installed.Thanks,Jon